fix: export chain state (#446)

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
This commit is contained in:
yihuang 2021-08-17 20:06:08 +08:00 committed by GitHub
parent 2edcbf44dd
commit d93205b711
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -174,7 +174,7 @@ func (app *EthermintApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAd
counter := int16(0) counter := int16(0)
for ; iter.Valid(); iter.Next() { for ; iter.Valid(); iter.Next() {
addr := sdk.ValAddress(iter.Key()[1:]) addr := sdk.ValAddress(stakingtypes.AddressFromValidatorsKey(iter.Key()))
validator, found := app.StakingKeeper.GetValidator(ctx, addr) validator, found := app.StakingKeeper.GetValidator(ctx, addr)
if !found { if !found {
return fmt.Errorf("expected validator %s not found", addr) return fmt.Errorf("expected validator %s not found", addr)