Documentation ¶
Overview ¶
Package sbft is a generated protocol buffer package.
It is generated from these files:
config.proto
It has these top-level messages:
ConsensusConfig JsonConfig Peer
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(c *ConsensusConfig, sc *backend.StackConfig) multichain.Consenter
New creates a new consenter for the SBFT consensus scheme. It accepts messages being delivered via Enqueue, orders them, and then uses the blockcutter to form the messages into blocks before writing to the given ledger.
func SaveConfig ¶
func SaveConfig(p *persist.Persist, c *ConsensusConfig) error
Types ¶
type ConsensusConfig ¶
type ConsensusConfig struct { Consensus *simplebft.Config `protobuf:"bytes,1,opt,name=consensus" json:"consensus,omitempty"` Peers map[string][]byte `` /* 137-byte string literal not displayed */ }
func ReadJsonConfig ¶
func ReadJsonConfig(file string) (*ConsensusConfig, error)
func RestoreConfig ¶
func RestoreConfig(p *persist.Persist) (*ConsensusConfig, error)
func (*ConsensusConfig) Descriptor ¶
func (*ConsensusConfig) Descriptor() ([]byte, []int)
func (*ConsensusConfig) GetConsensus ¶
func (m *ConsensusConfig) GetConsensus() *simplebft.Config
func (*ConsensusConfig) GetPeers ¶
func (m *ConsensusConfig) GetPeers() map[string][]byte
func (*ConsensusConfig) ProtoMessage ¶
func (*ConsensusConfig) ProtoMessage()
func (*ConsensusConfig) Reset ¶
func (m *ConsensusConfig) Reset()
func (*ConsensusConfig) String ¶
func (m *ConsensusConfig) String() string
type JsonConfig ¶
type JsonConfig struct { Consensus *simplebft.Config `protobuf:"bytes,1,opt,name=consensus" json:"consensus,omitempty"` Peers []*Peer `protobuf:"bytes,2,rep,name=peers" json:"peers,omitempty"` }
func (*JsonConfig) Descriptor ¶
func (*JsonConfig) Descriptor() ([]byte, []int)
func (*JsonConfig) GetConsensus ¶
func (m *JsonConfig) GetConsensus() *simplebft.Config
func (*JsonConfig) GetPeers ¶
func (m *JsonConfig) GetPeers() []*Peer
func (*JsonConfig) ProtoMessage ¶
func (*JsonConfig) ProtoMessage()
func (*JsonConfig) Reset ¶
func (m *JsonConfig) Reset()
func (*JsonConfig) String ¶
func (m *JsonConfig) String() string
type Peer ¶
type Peer struct { Address string `protobuf:"bytes,1,opt,name=address" json:"address,omitempty"` Cert string `protobuf:"bytes,2,opt,name=cert" json:"cert,omitempty"` }
func (*Peer) Descriptor ¶
func (*Peer) ProtoMessage ¶
func (*Peer) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.