diff --git a/app/export.go b/app/export.go index e2e187977..22e8d7413 100644 --- a/app/export.go +++ b/app/export.go @@ -150,6 +150,9 @@ func (app *IrisApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [ return false }, ) + if err != nil { + panic(err) + } // reinitialize all delegations for _, del := range dels { @@ -176,7 +179,7 @@ func (app *IrisApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [ /* Handle staking state. */ // iterate through redelegations, reset creation height - app.StakingKeeper.IterateRedelegations(ctx, func(_ int64, red stakingtypes.Redelegation) (stop bool) { + err = app.StakingKeeper.IterateRedelegations(ctx, func(_ int64, red stakingtypes.Redelegation) (stop bool) { for i := range red.Entries { red.Entries[i].CreationHeight = 0 } @@ -186,6 +189,9 @@ func (app *IrisApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [ } return false }) + if err != nil { + panic(err) + } // iterate through unbonding delegations, reset creation height app.StakingKeeper.IterateUnbondingDelegations(ctx, func(_ int64, ubd stakingtypes.UnbondingDelegation) (stop bool) { @@ -217,7 +223,10 @@ func (app *IrisApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [ validator.Jailed = true } - app.StakingKeeper.SetValidator(ctx, validator) + err = app.StakingKeeper.SetValidator(ctx, validator) + if err != nil { + panic(err) + } counter++ }