From 1d824d15a6771aa96560d6c5594a87705e633e6d Mon Sep 17 00:00:00 2001 From: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Date: Mon, 26 Aug 2019 16:57:21 +0200 Subject: [PATCH] Merge PR #4953: Remove distr keeper from staking app module --- simapp/app.go | 2 +- x/staking/module.go | 15 ++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/simapp/app.go b/simapp/app.go index 7037922a2..26bac8f52 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -184,7 +184,7 @@ func NewSimApp( gov.NewAppModule(app.GovKeeper, app.SupplyKeeper), mint.NewAppModule(app.MintKeeper), slashing.NewAppModule(app.SlashingKeeper, app.StakingKeeper), - staking.NewAppModule(app.StakingKeeper, app.DistrKeeper, app.AccountKeeper, app.SupplyKeeper), + staking.NewAppModule(app.StakingKeeper, app.AccountKeeper, app.SupplyKeeper), ) // During begin block slashing happens after distr.BeginBlocker so that diff --git a/x/staking/module.go b/x/staking/module.go index 4bfd0c70a..6b42d4b9a 100644 --- a/x/staking/module.go +++ b/x/staking/module.go @@ -112,22 +112,19 @@ type AppModule struct { AppModuleBasic AppModuleSimulation - keeper Keeper - distrKeeper types.DistributionKeeper - accKeeper types.AccountKeeper - supplyKeeper types.SupplyKeeper + keeper Keeper + accountKeeper types.AccountKeeper + supplyKeeper types.SupplyKeeper } // NewAppModule creates a new AppModule object -func NewAppModule(keeper Keeper, distrKeeper types.DistributionKeeper, accKeeper types.AccountKeeper, - supplyKeeper types.SupplyKeeper) AppModule { +func NewAppModule(keeper Keeper, accountKeeper types.AccountKeeper, supplyKeeper types.SupplyKeeper) AppModule { return AppModule{ AppModuleBasic: AppModuleBasic{}, AppModuleSimulation: AppModuleSimulation{}, keeper: keeper, - distrKeeper: distrKeeper, - accKeeper: accKeeper, + accountKeeper: accountKeeper, supplyKeeper: supplyKeeper, } } @@ -167,7 +164,7 @@ func (am AppModule) NewQuerierHandler() sdk.Querier { func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate { var genesisState GenesisState ModuleCdc.MustUnmarshalJSON(data, &genesisState) - return InitGenesis(ctx, am.keeper, am.accKeeper, am.supplyKeeper, genesisState) + return InitGenesis(ctx, am.keeper, am.accountKeeper, am.supplyKeeper, genesisState) } // ExportGenesis returns the exported genesis state as raw bytes for the staking