diff --git a/app/app.go b/app/app.go index cdf4ec162..321ef2f7d 100644 --- a/app/app.go +++ b/app/app.go @@ -236,9 +236,11 @@ func (app *IrisApp) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error) { func (app *IrisApp) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error) { var genesisState iristypes.GenesisState if err := tmjson.Unmarshal(req.AppStateBytes, &genesisState); err != nil { - panic(err) + return nil, err + } + if err := app.UpgradeKeeper.SetModuleVersionMap(ctx, app.mm.GetVersionMap()); err != nil { + return nil, err } - app.UpgradeKeeper.SetModuleVersionMap(ctx, app.mm.GetVersionMap()) return app.mm.InitGenesis(ctx, app.appCodec, genesisState) } diff --git a/app/export.go b/app/export.go index 0f6dd3fdd..e7ba6a2ab 100644 --- a/app/export.go +++ b/app/export.go @@ -88,7 +88,9 @@ func (app *IrisApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [ app.StakingKeeper.IterateValidators( ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { - _, _ = app.DistrKeeper.WithdrawValidatorCommission(ctx, sdk.ValAddress(val.GetOperator())) + if _, err := app.DistrKeeper.WithdrawValidatorCommission(ctx, sdk.ValAddress(val.GetOperator())); err != nil { + panic(err) + } return false }, ) @@ -226,7 +228,7 @@ func (app *IrisApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [ _, err = app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) if err != nil { - log.Fatal(err) + panic(err) } /* Handle slashing state. */ diff --git a/modules/internft/interface.go b/modules/internft/interface.go index 2135f5e20..fd13fd806 100644 --- a/modules/internft/interface.go +++ b/modules/internft/interface.go @@ -2,9 +2,11 @@ package internft import ( "context" + nftkeeper "cosmossdk.io/x/nft/keeper" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" + nfttypes "mods.irisnet.org/modules/nft/types" ) diff --git a/modules/mint/keeper/keeper.go b/modules/mint/keeper/keeper.go index be49252d3..4e49bfe95 100644 --- a/modules/mint/keeper/keeper.go +++ b/modules/mint/keeper/keeper.go @@ -4,7 +4,6 @@ import ( "fmt" "cosmossdk.io/log" - storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/wrapper/farm.go b/wrapper/farm.go index d7a7fe96d..d6b05a03a 100644 --- a/wrapper/farm.go +++ b/wrapper/farm.go @@ -2,6 +2,7 @@ package wrapper import ( "context" + "github.com/cosmos/cosmos-sdk/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"