Documentation ¶
Index ¶
- type Keeper
- func (k Keeper) ApplyAndReturnValidatorSetUpdates(ctx sdk.Context) (updates []abci.ValidatorUpdate, err error)
- func (k Keeper) BlockValidatorUpdates(ctx sdk.Context) []abci.ValidatorUpdate
- func (k Keeper) GetLastValidators(ctx sdk.Context) (validators []types.Validator)
- func (k Keeper) TrackHistoricalInfo(ctx sdk.Context)
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, key storetypes.StoreKey, ak stakingtypes.AccountKeeper, bk stakingtypes.BankKeeper, govModAddress string, vk types.VolunteerKeeper, ) *Keeper
func (Keeper) ApplyAndReturnValidatorSetUpdates ¶
func (k Keeper) ApplyAndReturnValidatorSetUpdates(ctx sdk.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 Tendermint.
func (Keeper) BlockValidatorUpdates ¶
func (k Keeper) BlockValidatorUpdates(ctx sdk.Context) []abci.ValidatorUpdate
BlockValidatorUpdates calculates the ValidatorUpdates for the current block Called in each EndBlock
func (Keeper) GetLastValidators ¶
get the group of the bonded validators
func (Keeper) TrackHistoricalInfo ¶
TrackHistoricalInfo saves the latest historical-info and deletes the oldest heights that are below pruning height