refactor(distribution)!: use collections for ValidatorCurrentRewards (#16459)
Co-authored-by: unknown unknown <unknown@unknown>
This commit is contained in:
co-authored by
unknown unknown
parent
bf8053cdfc
commit
2d1d68d3fd
@@ -388,10 +388,10 @@ func (s *SimTestSuite) getTestingValidator(ctx sdk.Context, commission types.Com
|
||||
func (s *SimTestSuite) setupValidatorRewards(ctx sdk.Context, valAddress sdk.ValAddress) {
|
||||
decCoins := sdk.DecCoins{sdk.NewDecCoinFromDec(sdk.DefaultBondDenom, math.LegacyOneDec())}
|
||||
historicalRewards := distrtypes.NewValidatorHistoricalRewards(decCoins, 2)
|
||||
s.distrKeeper.SetValidatorHistoricalRewards(ctx, valAddress, 2, historicalRewards)
|
||||
s.Require().NoError(s.distrKeeper.SetValidatorHistoricalRewards(ctx, valAddress, 2, historicalRewards))
|
||||
// setup current revards
|
||||
currentRewards := distrtypes.NewValidatorCurrentRewards(decCoins, 3)
|
||||
s.distrKeeper.SetValidatorCurrentRewards(ctx, valAddress, currentRewards)
|
||||
s.Require().NoError(s.distrKeeper.ValidatorCurrentRewards.Set(ctx, valAddress, currentRewards))
|
||||
}
|
||||
|
||||
func TestSimTestSuite(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user