Documentation ¶
Index ¶
- type Keeper
- func (k Keeper) ApplyAndReturnValidatorSetUpdates(ctx context.Context) (updates []abci.ValidatorUpdate, err error)
- func (k Keeper) BlockValidatorUpdates(ctx context.Context) ([]abci.ValidatorUpdate, error)
- func (k Keeper) GetLastValidators(ctx context.Context) (validators []types.Validator, err error)
- func (k Keeper) TrackHistoricalInfo(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keeper ¶
type Keeper struct { *stakingkeeper.Keeper // contains filtered or unexported fields }
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeService store.KVStoreService, ak stakingtypes.AccountKeeper, bk stakingtypes.BankKeeper, govModAddress string, vk types.VolunteerKeeper, validatorAddressCodec address.Codec, consensusAddressCodec address.Codec, ) *Keeper
func (Keeper) ApplyAndReturnValidatorSetUpdates ¶
func (k Keeper) ApplyAndReturnValidatorSetUpdates(ctx context.Context) (updates []abci.ValidatorUpdate, err error)
ApplyAndReturnValidatorSetUpdates applies and return accumulated updates to the bonded validator set. Also, * Updates the active valset as keyed by LastValidatorPowerKey. * Updates the total power as keyed by LastTotalPowerKey. * Updates validator status' according to updated powers. * Updates the fee pool bonded vs not-bonded tokens. * Updates relevant indices. It gets called once after genesis, another time maybe after genesis transactions, then once at every EndBlock.
CONTRACT: Only validators with non-zero power or zero-power that were bonded at the previous block height or were removed from the validator set entirely are returned to CometBFT.
func (Keeper) BlockValidatorUpdates ¶
BlockValidatorUpdates calculates the ValidatorUpdates for the current block Called in each EndBlock
func (Keeper) GetLastValidators ¶
GetLastValidators gets the group of the bonded validators