diff --git a/app/export.go b/app/export.go index 4347df0fcb93a..d98ffe1f81199 100644 --- a/app/export.go +++ b/app/export.go @@ -2,7 +2,6 @@ package gaia import ( "encoding/json" - "log" servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -59,7 +58,7 @@ func (app *GaiaApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [ for _, addr := range jailAllowedAddrs { _, err := sdk.ValAddressFromBech32(addr) if err != nil { - log.Fatal(err) + panic(err) } allowedAddrsMap[addr] = true } @@ -110,7 +109,7 @@ func (app *GaiaApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [ err := app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, val.GetOperator()) if err != nil { - log.Fatal(err) + panic(err) } return false }) @@ -163,6 +162,7 @@ func (app *GaiaApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [ // update bond intra-tx counters. store := ctx.KVStore(app.GetKey(stakingtypes.StoreKey)) iter := sdk.KVStoreReversePrefixIterator(store, stakingtypes.ValidatorsKey) + counter := int16(0) for ; iter.Valid(); iter.Next() { @@ -185,7 +185,7 @@ func (app *GaiaApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [ _, err := app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) if err != nil { - log.Fatal(err) + panic(err) } /* Handle slashing state. */