diff --git a/x/bank/module.go b/x/bank/module.go index 3314dd8ee922..ff0c02aeeb8e 100644 --- a/x/bank/module.go +++ b/x/bank/module.go @@ -29,7 +29,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/bank/client/cli" "github.com/cosmos/cosmos-sdk/x/bank/exported" "github.com/cosmos/cosmos-sdk/x/bank/keeper" - bankv1 "github.com/cosmos/cosmos-sdk/x/bank/migrations/v1" + v1bank "github.com/cosmos/cosmos-sdk/x/bank/migrations/v1" "github.com/cosmos/cosmos-sdk/x/bank/simulation" "github.com/cosmos/cosmos-sdk/x/bank/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" @@ -95,7 +95,7 @@ func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) types.RegisterInterfaces(registry) // Register legacy interfaces for migration scripts. - bankv1.RegisterInterfaces(registry) + v1bank.RegisterInterfaces(registry) } // AppModule implements an application module for the bank module. diff --git a/x/crisis/module.go b/x/crisis/module.go index ee3fec22194d..0df2d64d900c 100644 --- a/x/crisis/module.go +++ b/x/crisis/module.go @@ -29,10 +29,9 @@ import ( "github.com/cosmos/cosmos-sdk/x/crisis/keeper" "github.com/cosmos/cosmos-sdk/x/crisis/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" ) -// ConsensusVersion defines the current x/params module consensus version. +// ConsensusVersion defines the current x/crisis module consensus version. const ConsensusVersion = 2 var ( @@ -198,12 +197,15 @@ func init() { type crisisInputs struct { depinject.In - Config *modulev1.Module - Key *store.KVStoreKey - Cdc codec.Codec - AppOpts servertypes.AppOptions `optional:"true"` - Subspace paramstypes.Subspace + Config *modulev1.Module + Key *store.KVStoreKey + Cdc codec.Codec + AppOpts servertypes.AppOptions `optional:"true"` + BankKeeper types.SupplyKeeper + + // LegacySubspace is used solely for migration of x/params managed parameters + LegacySubspace exported.Subspace } type crisisOutputs struct { @@ -236,7 +238,7 @@ func provideModule(in crisisInputs) crisisOutputs { skipGenesisInvariants := cast.ToBool(in.AppOpts.Get(FlagSkipGenesisInvariants)) - m := NewAppModule(k, skipGenesisInvariants, in.Subspace) + m := NewAppModule(k, skipGenesisInvariants, in.LegacySubspace) return crisisOutputs{CrisisKeeper: k, Module: runtime.WrapAppModule(m)} }