diff --git a/x/stake/genesis.go b/x/stake/genesis.go index b4ed80e51482..759cd2a62114 100644 --- a/x/stake/genesis.go +++ b/x/stake/genesis.go @@ -18,6 +18,7 @@ func InitGenesis(ctx sdk.Context, keeper Keeper, data types.GenesisState) error keeper.InitIntraTxCounter(ctx) for i, validator := range data.Validators { + validator.BondIntraTxCounter = int16(i) // set the intra-tx counter to the order the validators are presented keeper.SetValidator(ctx, validator) if validator.Tokens.IsZero() { @@ -29,8 +30,6 @@ func InitGenesis(ctx sdk.Context, keeper Keeper, data types.GenesisState) error // Manually set indexes for the first time keeper.SetValidatorByPubKeyIndex(ctx, validator) - - validator.BondIntraTxCounter = int16(i) // set the intra-tx counter to the order the validators are presented keeper.SetValidatorByPowerIndex(ctx, validator, data.Pool) if validator.Status == sdk.Bonded {