Closed mpoke closed 3 months ago
Would it be possible to have a utility function that returns the active portion of the validator set instead of adding IterateLastValidatorPowers
in all places?
e.g.
providerKeeper.GetLastActiveValidatorPowers()
func (k *Keeper) GetLastActiveValidatorPowers() <return-type> {
...
k.stakingKeeper.IterateLastValidatorPowers(...)
return <return-type>
}
Problem
The
GetLastValidators
method of the staking module has a panic in it. Calling this from BeginBlock or EndBlock might lead to the chain to halt.Closing criteria
All the calls to
GetLastValidators
are replaced withIterateLastValidatorPowers
.