Documentation ¶
Index ¶
- type Streamlet
- func (sl *Streamlet) GetChainStatus() string
- func (sl *Streamlet) GetNotarizedHeight() int
- func (sl *Streamlet) MakeProposal(view types.View, payload []*message.Transaction) *blockchain.Block
- func (sl *Streamlet) ProcessBlock(block *blockchain.Block) error
- func (sl *Streamlet) ProcessLocalTmo(view types.View)
- func (sl *Streamlet) ProcessRemoteTmo(tmo *pacemaker.TMO)
- func (sl *Streamlet) ProcessVote(vote *blockchain.Vote)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Streamlet ¶
func NewStreamlet ¶
func NewStreamlet( node node.Node, pm *pacemaker.Pacemaker, elec election.Election, committedBlocks chan *blockchain.Block, forkedBlocks chan *blockchain.Block) *Streamlet
NewStreamlet creates a new Streamlet instance
func (*Streamlet) GetChainStatus ¶
func (*Streamlet) GetNotarizedHeight ¶
func (*Streamlet) MakeProposal ¶
func (sl *Streamlet) MakeProposal(view types.View, payload []*message.Transaction) *blockchain.Block
func (*Streamlet) ProcessBlock ¶
func (sl *Streamlet) ProcessBlock(block *blockchain.Block) error
ProcessBlock processes an incoming block as follows: 1. check if the view of the block matches current view (ignore for now) 2. check if the view of the block matches the proposer's view (ignore for now) 3. insert the block into the block tree 4. if the view of the block is lower than the current view, don't vote 5. if the block is extending the longest notarized chain, vote for the block 6. if the view of the block is higher than the the current view, buffer the block and process it when entering that view
func (*Streamlet) ProcessLocalTmo ¶
func (*Streamlet) ProcessRemoteTmo ¶
func (*Streamlet) ProcessVote ¶
func (sl *Streamlet) ProcessVote(vote *blockchain.Vote)
Click to show internal directories.
Click to hide internal directories.