diff --git a/x/ccv/democracy/staking/module.go b/x/ccv/democracy/staking/module.go index 7c694cc38d..a0b3aa851f 100644 --- a/x/ccv/democracy/staking/module.go +++ b/x/ccv/democracy/staking/module.go @@ -5,6 +5,7 @@ import ( "encoding/json" "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/x/staking" "github.com/cosmos/cosmos-sdk/x/staking/exported" @@ -41,11 +42,11 @@ type AppModule struct { // NewAppModule creates a new AppModule object using the native x/staking module // AppModule constructor. -func NewAppModule(cdc codec.Codec, keeper keeper.Keeper, ak types.AccountKeeper, bk types.BankKeeper, subspace exported.Subspace) AppModule { - stakingAppMod := staking.NewAppModule(cdc, &keeper, ak, bk, subspace) +func NewAppModule(cdc codec.Codec, keeper *keeper.Keeper, ak types.AccountKeeper, bk types.BankKeeper, subspace exported.Subspace) AppModule { + stakingAppMod := staking.NewAppModule(cdc, keeper, ak, bk, subspace) return AppModule{ AppModule: stakingAppMod, - keeper: keeper, + keeper: *keeper, accKeeper: ak, bankKeeper: bk, } @@ -59,7 +60,7 @@ func NewAppModule(cdc codec.Codec, keeper keeper.Keeper, ak types.AccountKeeper, // Note: InitGenesis is not called during the soft upgrade of a module // (as a part of a changeover from standalone -> consumer chain), // so there is no special handling needed in this method for a consumer being in the pre-CCV state. -func (am AppModule) InitGenesis(ctx context.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { +func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { var genesisState types.GenesisState cdc.MustUnmarshalJSON(data, &genesisState)