Skip to content

Commit

Permalink
removed acck keeper dependency in custom staking module
Browse files Browse the repository at this point in the history
  • Loading branch information
RustNinja committed Dec 22, 2023
1 parent 9e57dae commit 4c3e769
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 0 additions & 4 deletions custom/staking/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -14,7 +13,6 @@ import (
type Keeper struct {
stakingkeeper.Keeper
cdc codec.BinaryCodec
acck accountkeeper.AccountKeeper
Stakingmiddleware *stakingmiddleware.Keeper
authority string
}
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 4c3e769

Please sign in to comment.