Documentation
¶
Index ¶
- type Consensus
- type Manager
- func MockingManager(ts *testsuite.TestSuite, state *state.MockState, valKeys []*bls.ValidatorKey) (Manager, []*consensus.MockConsensus)
- func NewManagerV1(ctx context.Context, conf *consensus.Config, state state.Facade, ...) Manager
- func NewManagerV2(ctx context.Context, conf *consensusv2.Config, state state.Facade, ...) Manager
- type ManagerReader
- type Reader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager interface {
ManagerReader
MoveToNewHeight()
AddVote(vote *vote.Vote)
SetProposal(prop *proposal.Proposal)
IsDeprecated() bool
}
func MockingManager ¶
func MockingManager(ts *testsuite.TestSuite, state *state.MockState, valKeys []*bls.ValidatorKey, ) (Manager, []*consensus.MockConsensus)
func NewManagerV1 ¶
func NewManagerV1( ctx context.Context, conf *consensus.Config, state state.Facade, valKeys []*bls.ValidatorKey, rewardAddrs []crypto.Address, broadcastPipe pipeline.Pipeline[message.Message], ) Manager
NewManagerV1 creates a new manager instance that manages a set of consensus instances, each associated with a validator key and a reward address. It is not thread-safe.
type ManagerReader ¶
type Reader ¶
type Reader interface {
ConsensusKey() *bls.PublicKey
AllVotes() []*vote.Vote
HandleQueryVote(height uint32, round int16) *vote.Vote
HandleQueryProposal(height uint32, round int16) *proposal.Proposal
Proposal() *proposal.Proposal
HasVote(h hash.Hash) bool
HeightRound() (uint32, int16)
IsActive() bool
IsProposer() bool
}
Click to show internal directories.
Click to hide internal directories.