Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Commit

Permalink
Merge pull request #124 from notional-labs/fix-consensus-failed
Browse files Browse the repository at this point in the history
add staking hook
  • Loading branch information
vuong177 authored Jun 13, 2022
2 parents 244fe33 + 1f0f695 commit 74ca79f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,12 @@ func (appKeepers *AppKeepers) InitNormalKeepers(
appKeepers.AccountKeeper,
)

// register the staking hooks
// NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks
appKeepers.StakingKeeper = *stakingKeeper.SetHooks(
stakingtypes.NewMultiStakingHooks(appKeepers.DistrKeeper.Hooks(), appKeepers.SlashingKeeper.Hooks()),
)

// Create Transfer Keepers
transferKeeper := ibctransferkeeper.NewKeeper(
appCodec,
Expand Down Expand Up @@ -274,6 +280,11 @@ func (appKeepers *AppKeepers) InitNormalKeepers(
appKeepers.GetSubspace(govtypes.ModuleName), appKeepers.AccountKeeper, appKeepers.BankKeeper,
appKeepers.StakingKeeper, govRouter, bApp.MsgServiceRouter(), govtypes.DefaultConfig())
appKeepers.GovKeeper = govKeeper
appKeepers.GovKeeper = *govKeeper.SetHooks(
govtypes.NewMultiGovHooks(
// register the governance hooks
),
)
}

func (appKeepers *AppKeepers) InitSpecialKeepers(
Expand Down

0 comments on commit 74ca79f

Please sign in to comment.