feat: add endblocker with valsetupdate type (#15829)
This commit is contained in:
@@ -15,7 +15,6 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/x/slashing"
|
||||
slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper"
|
||||
"github.com/cosmos/cosmos-sdk/x/slashing/testutil"
|
||||
"github.com/cosmos/cosmos-sdk/x/staking"
|
||||
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
|
||||
stakingtestutil "github.com/cosmos/cosmos-sdk/x/staking/testutil"
|
||||
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
|
||||
@@ -46,7 +45,7 @@ func TestBeginBlocker(t *testing.T) {
|
||||
// bond the validator
|
||||
power := int64(100)
|
||||
amt := tstaking.CreateValidatorWithValPower(addr, pk, power, true)
|
||||
staking.EndBlocker(ctx, stakingKeeper)
|
||||
stakingKeeper.EndBlocker(ctx)
|
||||
require.Equal(
|
||||
t, bankKeeper.GetAllBalances(ctx, sdk.AccAddress(addr)),
|
||||
sdk.NewCoins(sdk.NewCoin(stakingKeeper.GetParams(ctx).BondDenom, InitTokens.Sub(amt))),
|
||||
@@ -97,7 +96,7 @@ func TestBeginBlocker(t *testing.T) {
|
||||
}
|
||||
|
||||
// end block
|
||||
staking.EndBlocker(ctx, stakingKeeper)
|
||||
stakingKeeper.EndBlocker(ctx)
|
||||
|
||||
// validator should be jailed
|
||||
validator, found := stakingKeeper.GetValidatorByConsAddr(ctx, sdk.GetConsAddress(pk))
|
||||
|
||||
Reference in New Issue
Block a user