From 4c3e76949da27af82b59d7072fd6ca35a9fd3bf6 Mon Sep 17 00:00:00 2001 From: rustdev Date: Fri, 22 Dec 2023 21:17:12 +0000 Subject: [PATCH] removed acck keeper dependency in custom staking module --- app/keepers/keepers.go | 2 +- custom/staking/keeper/keeper.go | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index c46e8867c..b56be110d 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -196,7 +196,7 @@ func (appKeepers *AppKeepers) InitNormalKeepers( appKeepers.StakingMiddlewareKeeper = stakingmiddleware.NewKeeper(appCodec, appKeepers.keys[stakingmiddlewaretypes.StoreKey], authtypes.NewModuleAddress(govtypes.ModuleName).String()) appKeepers.CustomStakingKeeper = customstaking.NewKeeper( - appCodec /*appKeepers.keys[stakingtypes.StoreKey],*/, *appKeepers.StakingKeeper, appKeepers.AccountKeeper, &appKeepers.StakingMiddlewareKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(), + appCodec, *appKeepers.StakingKeeper, &appKeepers.StakingMiddlewareKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) appKeepers.DistrKeeper = distrkeeper.NewKeeper( diff --git a/custom/staking/keeper/keeper.go b/custom/staking/keeper/keeper.go index 9a9b9b92a..c1cff8acb 100644 --- a/custom/staking/keeper/keeper.go +++ b/custom/staking/keeper/keeper.go @@ -3,7 +3,6 @@ package keeper import ( abcicometbft "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/codec" - accountkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -14,7 +13,6 @@ import ( type Keeper struct { stakingkeeper.Keeper cdc codec.BinaryCodec - acck accountkeeper.AccountKeeper Stakingmiddleware *stakingmiddleware.Keeper authority string } @@ -110,13 +108,11 @@ func (k Keeper) BlockValidatorUpdates(ctx sdk.Context, height int64) []abcicomet func NewKeeper( cdc codec.BinaryCodec, staking stakingkeeper.Keeper, - acck accountkeeper.AccountKeeper, stakingmiddleware *stakingmiddleware.Keeper, authority string, ) Keeper { keeper := Keeper{ Keeper: staking, - acck: acck, authority: authority, Stakingmiddleware: stakingmiddleware, cdc: cdc,