Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions modules/apps/callbacks/testing/simapp/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,9 @@ func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []
panic(err)
}

// Iterate through validators by power descending, reset bond heights, and
// update bond intra-tx counters.
// Iterate through validators by power descending and reset bond heights.
store := ctx.KVStore(app.keys[stakingtypes.StoreKey])
iter := storetypes.KVStoreReversePrefixIterator(store, stakingtypes.ValidatorsKey)
counter := int16(0)

for ; iter.Valid(); iter.Next() {
addr := sdk.ValAddress(stakingtypes.AddressFromValidatorsKey(iter.Key()))
Expand All @@ -213,7 +211,6 @@ func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []
if err != nil {
panic(errors.New("couldn't set validator"))
}
counter++
}

iter.Close()
Expand Down
5 changes: 1 addition & 4 deletions modules/light-clients/08-wasm/testing/simapp/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,9 @@ func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []
panic(err)
}

// Iterate through validators by power descending, reset bond heights, and
// update bond intra-tx counters.
// Iterate through validators by power descending and reset bond heights.
store := ctx.KVStore(app.keys[stakingtypes.StoreKey])
iter := storetypes.KVStoreReversePrefixIterator(store, stakingtypes.ValidatorsKey)
counter := int16(0)

for ; iter.Valid(); iter.Next() {
addr := sdk.ValAddress(stakingtypes.AddressFromValidatorsKey(iter.Key()))
Expand All @@ -214,7 +212,6 @@ func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []
if err := app.StakingKeeper.SetValidator(ctx, validator); err != nil {
panic(err)
}
counter++
}

iter.Close()
Expand Down
5 changes: 1 addition & 4 deletions simapp/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,9 @@ func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []
panic(err)
}

// Iterate through validators by power descending, reset bond heights, and
// update bond intra-tx counters.
// Iterate through validators by power descending and reset bond heights.
store := ctx.KVStore(app.keys[stakingtypes.StoreKey])
iter := storetypes.KVStoreReversePrefixIterator(store, stakingtypes.ValidatorsKey)
counter := int16(0)

for ; iter.Valid(); iter.Next() {
addr := sdk.ValAddress(stakingtypes.AddressFromValidatorsKey(iter.Key()))
Expand All @@ -216,7 +214,6 @@ func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []
if err != nil {
panic(errors.New("couldn't set validator"))
}
counter++
}

iter.Close()
Expand Down