From 56b469858b6ba01939cea9cc5c2b2f05dd56d904 Mon Sep 17 00:00:00 2001 From: Tanmay Date: Thu, 3 Oct 2024 13:17:34 +0530 Subject: [PATCH] register legacy router --- app/app.go | 4 ++++ app/modules.go | 14 +++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/app/app.go b/app/app.go index 86955375d7..6e0a86b01b 100644 --- a/app/app.go +++ b/app/app.go @@ -607,6 +607,7 @@ func New( govRouter.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler). AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)). AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)) + govConfig := govtypes.DefaultConfig() govKeeper := govkeeper.NewKeeper( appCodec, @@ -618,11 +619,14 @@ func New( govConfig, authAddr, ) + app.GovKeeper = *govKeeper.SetHooks( govtypes.NewMultiGovHooks( // register governance hooks ), ) + // Set legacy router for backwards compatibility with gov v1beta1 + app.GovKeeper.SetLegacyRouter(govRouter) // Create evidence Keeper for to register the IBC light client misbehaviour evidence route evidenceKeeper := evidencekeeper.NewKeeper( diff --git a/app/modules.go b/app/modules.go index 038b3766aa..3324680902 100644 --- a/app/modules.go +++ b/app/modules.go @@ -141,13 +141,13 @@ func simulationModules( app.GetSubspace(authtypes.ModuleName), ), bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper, app.GetSubspace(banktypes.ModuleName)), - //gov.NewAppModule( - // appCodec, - // &app.GovKeeper, - // app.AccountKeeper, - // app.BankKeeper, - // app.GetSubspace(govtypes.ModuleName), - //), + gov.NewAppModule( + appCodec, + &app.GovKeeper, + app.AccountKeeper, + app.BankKeeper, + app.GetSubspace(govtypes.ModuleName), + ), staking.NewAppModule( appCodec, app.StakingKeeper,