Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager interface {
validators.State
// OnAcceptedBlockID registers the ID of the latest accepted block.
// It is used to update the [recentlyAccepted] sliding window.
OnAcceptedBlockID(blkID ids.ID)
}
Manager adds the ability to introduce newly accepted blocks IDs to the State interface.
var TestManager Manager = testManager{}
type State ¶ added in v1.10.6
type State interface {
GetTx(txID ids.ID) (*txs.Tx, status.Status, error)
GetLastAccepted() ids.ID
GetStatelessBlock(blockID ids.ID) (block.Block, error)
// ApplyValidatorWeightDiffs iterates from [startHeight] towards the genesis
// block until it has applied all of the diffs up to and including
// [endHeight]. Applying the diffs modifies [validators].
//
// Invariant: If attempting to generate the validator set for
// [endHeight - 1], [validators] must initially contain the validator
// weights for [startHeight].
//
// Note: Because this function iterates towards the genesis, [startHeight]
// should normally be greater than or equal to [endHeight].
ApplyValidatorWeightDiffs(
ctx context.Context,
validators map[ids.NodeID]*validators.GetValidatorOutput,
startHeight uint64,
endHeight uint64,
subnetID ids.ID,
) error
// ApplyValidatorPublicKeyDiffs iterates from [startHeight] towards the
// genesis block until it has applied all of the diffs up to and including
// [endHeight]. Applying the diffs modifies [validators].
//
// Invariant: If attempting to generate the validator set for
// [endHeight - 1], [validators] must initially contain the validator
// weights for [startHeight].
//
// Note: Because this function iterates towards the genesis, [startHeight]
// should normally be greater than or equal to [endHeight].
ApplyValidatorPublicKeyDiffs(
ctx context.Context,
validators map[ids.NodeID]*validators.GetValidatorOutput,
startHeight uint64,
endHeight uint64,
) error
}
Click to show internal directories.
Click to hide internal directories.