Documentation ¶
Index ¶
- type BlockProducer
- type Committee
- func (_m *Committee) DKG(blockID flow.Identifier) (hotstuff.DKG, error)
- func (_m *Committee) Identities(blockID flow.Identifier, selector flow.IdentityFilter) (flow.IdentityList, error)
- func (_m *Committee) Identity(blockID flow.Identifier, participantID flow.Identifier) (*flow.Identity, error)
- func (_m *Committee) LeaderForView(view uint64) (flow.Identifier, error)
- func (_m *Committee) Self() flow.Identifier
- type Communicator
- type Consumer
- func (_m *Consumer) OnBlockIncorporated(_a0 *model.Block)
- func (_m *Consumer) OnDoubleProposeDetected(_a0 *model.Block, _a1 *model.Block)
- func (_m *Consumer) OnDoubleVotingDetected(_a0 *model.Vote, _a1 *model.Vote)
- func (_m *Consumer) OnEnteringView(viewNumber uint64, leader flow.Identifier)
- func (_m *Consumer) OnEventProcessed()
- func (_m *Consumer) OnFinalizedBlock(_a0 *model.Block)
- func (_m *Consumer) OnForkChoiceGenerated(_a0 uint64, _a1 *flow.QuorumCertificate)
- func (_m *Consumer) OnInvalidVoteDetected(_a0 *model.Vote)
- func (_m *Consumer) OnProposingBlock(proposal *model.Proposal)
- func (_m *Consumer) OnQcConstructedFromVotes(_a0 *flow.QuorumCertificate)
- func (_m *Consumer) OnQcIncorporated(_a0 *flow.QuorumCertificate)
- func (_m *Consumer) OnQcTriggeredViewChange(qc *flow.QuorumCertificate, newView uint64)
- func (_m *Consumer) OnReachedTimeout(timeout *model.TimerInfo)
- func (_m *Consumer) OnReceiveProposal(currentView uint64, proposal *model.Proposal)
- func (_m *Consumer) OnReceiveVote(currentView uint64, vote *model.Vote)
- func (_m *Consumer) OnStartingTimeout(_a0 *model.TimerInfo)
- func (_m *Consumer) OnVoting(vote *model.Vote)
- type DKG
- type EventHandler
- type FinalizationConsumer
- type FollowerLogic
- type Forks
- func (_m *Forks) AddBlock(block *model.Block) error
- func (_m *Forks) AddQC(qc *flow.QuorumCertificate) error
- func (_m *Forks) FinalizedBlock() *model.Block
- func (_m *Forks) FinalizedView() uint64
- func (_m *Forks) GetBlock(id flow.Identifier) (*model.Block, bool)
- func (_m *Forks) GetBlocksForView(view uint64) []*model.Block
- func (_m *Forks) IsSafeBlock(block *model.Block) bool
- func (_m *Forks) MakeForkChoice(curView uint64) (*flow.QuorumCertificate, *model.Block, error)
- type ForksReader
- type PaceMaker
- func (_m *PaceMaker) BlockRateDelay() time.Duration
- func (_m *PaceMaker) CurView() uint64
- func (_m *PaceMaker) OnTimeout() *model.NewViewEvent
- func (_m *PaceMaker) Start()
- func (_m *PaceMaker) TimeoutChannel() <-chan time.Time
- func (_m *PaceMaker) UpdateCurViewWithBlock(block *model.Block, isLeaderForNextView bool) (*model.NewViewEvent, bool)
- func (_m *PaceMaker) UpdateCurViewWithQC(qc *flow.QuorumCertificate) (*model.NewViewEvent, bool)
- type Persister
- type Signer
- type SignerVerifier
- func (_m *SignerVerifier) CreateProposal(block *model.Block) (*model.Proposal, error)
- func (_m *SignerVerifier) CreateQC(votes []*model.Vote) (*flow.QuorumCertificate, error)
- func (_m *SignerVerifier) CreateVote(block *model.Block) (*model.Vote, error)
- func (_m *SignerVerifier) VerifyQC(voters flow.IdentityList, sigData []byte, block *model.Block) (bool, error)
- func (_m *SignerVerifier) VerifyVote(voter *flow.Identity, sigData []byte, block *model.Block) (bool, error)
- type Validator
- type Verifier
- type VoteAggregator
- func (_m *VoteAggregator) BuildQCOnReceivedBlock(block *model.Block) (*flow.QuorumCertificate, bool, error)
- func (_m *VoteAggregator) PruneByView(view uint64)
- func (_m *VoteAggregator) StorePendingVote(vote *model.Vote) (bool, error)
- func (_m *VoteAggregator) StoreProposerVote(vote *model.Vote) bool
- func (_m *VoteAggregator) StoreVoteAndBuildQC(vote *model.Vote, block *model.Block) (*flow.QuorumCertificate, bool, error)
- type Voter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockProducer ¶
BlockProducer is an autogenerated mock type for the BlockProducer type
func (*BlockProducer) MakeBlockProposal ¶
func (_m *BlockProducer) MakeBlockProposal(qc *flow.QuorumCertificate, view uint64) (*model.Proposal, error)
MakeBlockProposal provides a mock function with given fields: qc, view
type Committee ¶
Committee is an autogenerated mock type for the Committee type
func (*Committee) Identities ¶
func (_m *Committee) Identities(blockID flow.Identifier, selector flow.IdentityFilter) (flow.IdentityList, error)
Identities provides a mock function with given fields: blockID, selector
func (*Committee) Identity ¶
func (_m *Committee) Identity(blockID flow.Identifier, participantID flow.Identifier) (*flow.Identity, error)
Identity provides a mock function with given fields: blockID, participantID
func (*Committee) LeaderForView ¶
func (_m *Committee) LeaderForView(view uint64) (flow.Identifier, error)
LeaderForView provides a mock function with given fields: view
func (*Committee) Self ¶
func (_m *Committee) Self() flow.Identifier
Self provides a mock function with given fields:
type Communicator ¶
Communicator is an autogenerated mock type for the Communicator type
func (*Communicator) BroadcastProposal ¶
func (_m *Communicator) BroadcastProposal(proposal *flow.Header) error
BroadcastProposal provides a mock function with given fields: proposal
func (*Communicator) BroadcastProposalWithDelay ¶
func (_m *Communicator) BroadcastProposalWithDelay(proposal *flow.Header, delay time.Duration) error
BroadcastProposalWithDelay provides a mock function with given fields: proposal, delay
func (*Communicator) SendVote ¶
func (_m *Communicator) SendVote(blockID flow.Identifier, view uint64, sigData []byte, recipientID flow.Identifier) error
SendVote provides a mock function with given fields: blockID, view, sigData, recipientID
type Consumer ¶
Consumer is an autogenerated mock type for the Consumer type
func (*Consumer) OnBlockIncorporated ¶
OnBlockIncorporated provides a mock function with given fields: _a0
func (*Consumer) OnDoubleProposeDetected ¶
OnDoubleProposeDetected provides a mock function with given fields: _a0, _a1
func (*Consumer) OnDoubleVotingDetected ¶
OnDoubleVotingDetected provides a mock function with given fields: _a0, _a1
func (*Consumer) OnEnteringView ¶
func (_m *Consumer) OnEnteringView(viewNumber uint64, leader flow.Identifier)
OnEnteringView provides a mock function with given fields: viewNumber, leader
func (*Consumer) OnEventProcessed ¶
func (_m *Consumer) OnEventProcessed()
OnEventProcessed provides a mock function with given fields:
func (*Consumer) OnFinalizedBlock ¶
OnFinalizedBlock provides a mock function with given fields: _a0
func (*Consumer) OnForkChoiceGenerated ¶
func (_m *Consumer) OnForkChoiceGenerated(_a0 uint64, _a1 *flow.QuorumCertificate)
OnForkChoiceGenerated provides a mock function with given fields: _a0, _a1
func (*Consumer) OnInvalidVoteDetected ¶
OnInvalidVoteDetected provides a mock function with given fields: _a0
func (*Consumer) OnProposingBlock ¶
OnProposingBlock provides a mock function with given fields: proposal
func (*Consumer) OnQcConstructedFromVotes ¶
func (_m *Consumer) OnQcConstructedFromVotes(_a0 *flow.QuorumCertificate)
OnQcConstructedFromVotes provides a mock function with given fields: _a0
func (*Consumer) OnQcIncorporated ¶
func (_m *Consumer) OnQcIncorporated(_a0 *flow.QuorumCertificate)
OnQcIncorporated provides a mock function with given fields: _a0
func (*Consumer) OnQcTriggeredViewChange ¶
func (_m *Consumer) OnQcTriggeredViewChange(qc *flow.QuorumCertificate, newView uint64)
OnQcTriggeredViewChange provides a mock function with given fields: qc, newView
func (*Consumer) OnReachedTimeout ¶
OnReachedTimeout provides a mock function with given fields: timeout
func (*Consumer) OnReceiveProposal ¶
OnReceiveProposal provides a mock function with given fields: currentView, proposal
func (*Consumer) OnReceiveVote ¶
OnReceiveVote provides a mock function with given fields: currentView, vote
func (*Consumer) OnStartingTimeout ¶
OnStartingTimeout provides a mock function with given fields: _a0
type DKG ¶
DKG is an autogenerated mock type for the DKG type
func (*DKG) Index ¶
func (_m *DKG) Index(nodeID flow.Identifier) (uint, error)
Index provides a mock function with given fields: nodeID
type EventHandler ¶
EventHandler is an autogenerated mock type for the EventHandler type
func (*EventHandler) OnLocalTimeout ¶
func (_m *EventHandler) OnLocalTimeout() error
OnLocalTimeout provides a mock function with given fields:
func (*EventHandler) OnReceiveProposal ¶
func (_m *EventHandler) OnReceiveProposal(proposal *model.Proposal) error
OnReceiveProposal provides a mock function with given fields: proposal
func (*EventHandler) OnReceiveVote ¶
func (_m *EventHandler) OnReceiveVote(vote *model.Vote) error
OnReceiveVote provides a mock function with given fields: vote
func (*EventHandler) Start ¶
func (_m *EventHandler) Start() error
Start provides a mock function with given fields:
func (*EventHandler) TimeoutChannel ¶
func (_m *EventHandler) TimeoutChannel() <-chan time.Time
TimeoutChannel provides a mock function with given fields:
type FinalizationConsumer ¶
FinalizationConsumer is an autogenerated mock type for the FinalizationConsumer type
func (*FinalizationConsumer) OnBlockIncorporated ¶
func (_m *FinalizationConsumer) OnBlockIncorporated(_a0 *model.Block)
OnBlockIncorporated provides a mock function with given fields: _a0
func (*FinalizationConsumer) OnDoubleProposeDetected ¶
func (_m *FinalizationConsumer) OnDoubleProposeDetected(_a0 *model.Block, _a1 *model.Block)
OnDoubleProposeDetected provides a mock function with given fields: _a0, _a1
func (*FinalizationConsumer) OnFinalizedBlock ¶
func (_m *FinalizationConsumer) OnFinalizedBlock(_a0 *model.Block)
OnFinalizedBlock provides a mock function with given fields: _a0
type FollowerLogic ¶
FollowerLogic is an autogenerated mock type for the FollowerLogic type
func (*FollowerLogic) AddBlock ¶
func (_m *FollowerLogic) AddBlock(proposal *model.Proposal) error
AddBlock provides a mock function with given fields: proposal
func (*FollowerLogic) FinalizedBlock ¶
func (_m *FollowerLogic) FinalizedBlock() *model.Block
FinalizedBlock provides a mock function with given fields:
type Forks ¶
Forks is an autogenerated mock type for the Forks type
func (*Forks) AddQC ¶
func (_m *Forks) AddQC(qc *flow.QuorumCertificate) error
AddQC provides a mock function with given fields: qc
func (*Forks) FinalizedBlock ¶
FinalizedBlock provides a mock function with given fields:
func (*Forks) FinalizedView ¶
FinalizedView provides a mock function with given fields:
func (*Forks) GetBlocksForView ¶
GetBlocksForView provides a mock function with given fields: view
func (*Forks) IsSafeBlock ¶
IsSafeBlock provides a mock function with given fields: block
func (*Forks) MakeForkChoice ¶
MakeForkChoice provides a mock function with given fields: curView
type ForksReader ¶
ForksReader is an autogenerated mock type for the ForksReader type
func (*ForksReader) FinalizedBlock ¶
func (_m *ForksReader) FinalizedBlock() *model.Block
FinalizedBlock provides a mock function with given fields:
func (*ForksReader) FinalizedView ¶
func (_m *ForksReader) FinalizedView() uint64
FinalizedView provides a mock function with given fields:
func (*ForksReader) GetBlock ¶
func (_m *ForksReader) GetBlock(id flow.Identifier) (*model.Block, bool)
GetBlock provides a mock function with given fields: id
func (*ForksReader) GetBlocksForView ¶
func (_m *ForksReader) GetBlocksForView(view uint64) []*model.Block
GetBlocksForView provides a mock function with given fields: view
func (*ForksReader) IsSafeBlock ¶
func (_m *ForksReader) IsSafeBlock(block *model.Block) bool
IsSafeBlock provides a mock function with given fields: block
type PaceMaker ¶
PaceMaker is an autogenerated mock type for the PaceMaker type
func (*PaceMaker) BlockRateDelay ¶
BlockRateDelay provides a mock function with given fields:
func (*PaceMaker) OnTimeout ¶
func (_m *PaceMaker) OnTimeout() *model.NewViewEvent
OnTimeout provides a mock function with given fields:
func (*PaceMaker) Start ¶
func (_m *PaceMaker) Start()
Start provides a mock function with given fields:
func (*PaceMaker) TimeoutChannel ¶
TimeoutChannel provides a mock function with given fields:
func (*PaceMaker) UpdateCurViewWithBlock ¶
func (_m *PaceMaker) UpdateCurViewWithBlock(block *model.Block, isLeaderForNextView bool) (*model.NewViewEvent, bool)
UpdateCurViewWithBlock provides a mock function with given fields: block, isLeaderForNextView
func (*PaceMaker) UpdateCurViewWithQC ¶
func (_m *PaceMaker) UpdateCurViewWithQC(qc *flow.QuorumCertificate) (*model.NewViewEvent, bool)
UpdateCurViewWithQC provides a mock function with given fields: qc
type Persister ¶
Persister is an autogenerated mock type for the Persister type
func (*Persister) GetStarted ¶
GetStarted provides a mock function with given fields:
func (*Persister) PutStarted ¶
PutStarted provides a mock function with given fields: view
type Signer ¶
Signer is an autogenerated mock type for the Signer type
func (*Signer) CreateProposal ¶
CreateProposal provides a mock function with given fields: block
type SignerVerifier ¶
SignerVerifier is an autogenerated mock type for the SignerVerifier type
func (*SignerVerifier) CreateProposal ¶
CreateProposal provides a mock function with given fields: block
func (*SignerVerifier) CreateQC ¶
func (_m *SignerVerifier) CreateQC(votes []*model.Vote) (*flow.QuorumCertificate, error)
CreateQC provides a mock function with given fields: votes
func (*SignerVerifier) CreateVote ¶
CreateVote provides a mock function with given fields: block
func (*SignerVerifier) VerifyQC ¶
func (_m *SignerVerifier) VerifyQC(voters flow.IdentityList, sigData []byte, block *model.Block) (bool, error)
VerifyQC provides a mock function with given fields: voters, sigData, block
func (*SignerVerifier) VerifyVote ¶
func (_m *SignerVerifier) VerifyVote(voter *flow.Identity, sigData []byte, block *model.Block) (bool, error)
VerifyVote provides a mock function with given fields: voter, sigData, block
type Validator ¶
Validator is an autogenerated mock type for the Validator type
func (*Validator) ValidateProposal ¶
ValidateProposal provides a mock function with given fields: proposal
func (*Validator) ValidateQC ¶
ValidateQC provides a mock function with given fields: qc, block
type Verifier ¶
Verifier is an autogenerated mock type for the Verifier type
type VoteAggregator ¶
VoteAggregator is an autogenerated mock type for the VoteAggregator type
func (*VoteAggregator) BuildQCOnReceivedBlock ¶
func (_m *VoteAggregator) BuildQCOnReceivedBlock(block *model.Block) (*flow.QuorumCertificate, bool, error)
BuildQCOnReceivedBlock provides a mock function with given fields: block
func (*VoteAggregator) PruneByView ¶
func (_m *VoteAggregator) PruneByView(view uint64)
PruneByView provides a mock function with given fields: view
func (*VoteAggregator) StorePendingVote ¶
func (_m *VoteAggregator) StorePendingVote(vote *model.Vote) (bool, error)
StorePendingVote provides a mock function with given fields: vote
func (*VoteAggregator) StoreProposerVote ¶
func (_m *VoteAggregator) StoreProposerVote(vote *model.Vote) bool
StoreProposerVote provides a mock function with given fields: vote
func (*VoteAggregator) StoreVoteAndBuildQC ¶
func (_m *VoteAggregator) StoreVoteAndBuildQC(vote *model.Vote, block *model.Block) (*flow.QuorumCertificate, bool, error)
StoreVoteAndBuildQC provides a mock function with given fields: vote, block