Skip to content

Commit

Permalink
Merge pull request #107 from irisnet/irisnet/hotfix-v0.23.0-iris4
Browse files Browse the repository at this point in the history
Irisnet/hotfix v0.23.0 iris4
  • Loading branch information
wukongcheng authored Sep 13, 2018
2 parents ee0aed6 + 5bc397d commit 1a50123
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions x/stake/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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 {
Expand Down

0 comments on commit 1a50123

Please sign in to comment.