Documentation ¶
Index ¶
- func BuildExtendedCommitInfo(ec *types.ExtendedCommit, valSet *types.ValidatorSet, initialHeight int64, ...) abci.ExtendedCommitInfo
- func BuildLastCommitInfo(block *types.Block, lastValSet *types.ValidatorSet, initialHeight int64) abci.CommitInfo
- func GetBlockIdFromBlock(block *types.Block) (*types.BlockID, error)
- func MakeVote(val types.PrivValidator, chainID string, valIndex int32, height int64, ...) (*types.Vote, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildExtendedCommitInfo ¶
func BuildExtendedCommitInfo(ec *types.ExtendedCommit, valSet *types.ValidatorSet, initialHeight int64, ap types.ABCIParams) abci.ExtendedCommitInfo
mostly copy-pasted/adjusted from https://github.com/p-offtermatt/cometbft/blob/ph/make-public/state/execution.go#L486 BuildExtendedCommitInfo populates an ABCI extended commit from the corresponding CometBFT extended commit ec, using the stored validator set from ec. It requires ec to include the original precommit votes along with the vote extensions from the last commit.
For heights below the initial height, for which we do not have the required data, it returns an empty record.
Assumes that the commit signatures are sorted according to validator index.
func BuildLastCommitInfo ¶
func BuildLastCommitInfo(block *types.Block, lastValSet *types.ValidatorSet, initialHeight int64) abci.CommitInfo
func MakeVote ¶
func MakeVote( val types.PrivValidator, chainID string, valIndex int32, height int64, round int32, step int, blockID types.BlockID, time time.Time, ) (*types.Vote, error)
MakeVote creates a signed vote. Adapted from https://github.com/cometbft/cometbft/blob/9267594e0a17c01cc4a97b399ada5eaa8a734db5/internal/test/vote.go#L10.
Types ¶
This section is empty.