Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Replica ¶
type Replica struct { node.Node Safety election.Election // contains filtered or unexported fields }
func NewReplica ¶
NewReplica creates a new replica instance
func (*Replica) HandleBlock ¶
func (r *Replica) HandleBlock(block blockchain.Block)
func (*Replica) HandleVote ¶
func (r *Replica) HandleVote(vote blockchain.Vote)
func (*Replica) ListenCommittedBlocks ¶
func (r *Replica) ListenCommittedBlocks()
ListenCommittedBlocks listens committed blocks and forked blocks from the protocols
func (*Replica) ListenLocalEvent ¶
func (r *Replica) ListenLocalEvent()
ListenLocalEvent listens new view and timeout events
type Safety ¶
type Safety interface { ProcessBlock(block *blockchain.Block) error ProcessVote(vote *blockchain.Vote) ProcessRemoteTmo(tmo *pacemaker.TMO) ProcessLocalTmo(view types.View) MakeProposal(view types.View, payload []*message.Transaction) *blockchain.Block GetChainStatus() string }
Click to show internal directories.
Click to hide internal directories.