manager

package
v1.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consensus

type Consensus interface {
	Reader

	MoveToNewHeight()
	AddVote(vote *vote.Vote)
	SetProposal(prop *proposal.Proposal)
	IsDeprecated() bool
}

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.

func NewManagerV2

func NewManagerV2(
	ctx context.Context,
	conf *consensusv2.Config,
	state state.Facade,
	valKeys []*bls.ValidatorKey,
	rewardAddrs []crypto.Address,
	broadcastPipe pipeline.Pipeline[message.Message],
) Manager

type ManagerReader

type ManagerReader interface {
	Instances() []Reader
	HandleQueryVote(height types.Height, round types.Round) *vote.Vote
	HandleQueryProposal(height types.Height, round types.Round) *proposal.Proposal
	Proposal() *proposal.Proposal
	HeightRound() (types.Height, types.Round)
	HasActiveInstance() bool
}

type Reader

type Reader interface {
	ConsensusKey() *bls.PublicKey
	AllVotes() []*vote.Vote
	HandleQueryVote(height types.Height, round types.Round) *vote.Vote
	HandleQueryProposal(height types.Height, round types.Round) *proposal.Proposal
	Proposal() *proposal.Proposal
	HasVote(h hash.Hash) bool
	HeightRound() (types.Height, types.Round)
	IsActive() bool
	IsProposer() bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL