diff --git a/x/stake/keeper/inflation_test.go b/x/stake/keeper/inflation_test.go index 2fee8154a0..28efc0c59b 100644 --- a/x/stake/keeper/inflation_test.go +++ b/x/stake/keeper/inflation_test.go @@ -342,6 +342,7 @@ func checkValidatorSetup(t *testing.T, pool types.Pool, initialTotalTokens, init } // Checks that The inflation will correctly increase or decrease after an update to the pool +// nolint: gocyclo func checkInflation(t *testing.T, pool types.Pool, previousInflation, updatedInflation sdk.Rat, msg string) { inflationChange := updatedInflation.Sub(previousInflation) diff --git a/x/stake/keeper/validator.go b/x/stake/keeper/validator.go index 233c7b6e87..e8713c04d5 100644 --- a/x/stake/keeper/validator.go +++ b/x/stake/keeper/validator.go @@ -422,6 +422,11 @@ func (k Keeper) UpdateBondedValidatorsFull(ctx sdk.Context) { iterator.Close() // perform the actual kicks + kickOutValidators(k, ctx, toKickOut) + return +} + +func kickOutValidators(k Keeper, ctx sdk.Context, toKickOut map[string]byte) { for key := range toKickOut { ownerAddr := []byte(key) validator, found := k.GetValidator(ctx, ownerAddr) @@ -430,7 +435,6 @@ func (k Keeper) UpdateBondedValidatorsFull(ctx sdk.Context) { } k.unbondValidator(ctx, validator) } - return } // perform all the store operations for when a validator status becomes unbonded