From cf554f7ee1e8aaadebc9ba2ca9e63b74dbbb477d Mon Sep 17 00:00:00 2001 From: Sai Kumar <17549398+gsk967@users.noreply.github.com> Date: Fri, 20 Jan 2023 18:37:09 +0530 Subject: [PATCH] feat(cli): cancel gov proposal by proposer before voting period ends (#13010) Co-authored-by: Anil Kumar Kammari Co-authored-by: Aleksandr Bezobchuk Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com> Co-authored-by: Robert Zaremba Co-authored-by: Marko Closes https://github.com/cosmos/cosmos-sdk/issues/11554 --- app.go | 2 +- upgrades.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app.go b/app.go index 8a8819a84ce..2f94aecb343 100644 --- a/app.go +++ b/app.go @@ -357,7 +357,7 @@ func NewSimApp( */ govKeeper := govkeeper.NewKeeper( appCodec, keys[govtypes.StoreKey], app.AccountKeeper, app.BankKeeper, - app.StakingKeeper, app.MsgServiceRouter(), govConfig, authtypes.NewModuleAddress(govtypes.ModuleName).String(), + app.StakingKeeper, app.DistrKeeper, app.MsgServiceRouter(), govConfig, authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) // Set legacy router for backwards compatibility with gov v1beta1 diff --git a/upgrades.go b/upgrades.go index 1324d9d98e8..d92a9dbd7da 100644 --- a/upgrades.go +++ b/upgrades.go @@ -27,6 +27,9 @@ func (app SimApp) RegisterUpgradeHandlers() { // dedicated x/consensus module. baseapp.MigrateParams(ctx, baseAppLegacySS, &app.ConsensusParamsKeeper) + // Note: this migration is optional, + // You can include x/gov proposal migration documented at [UPGRADING.md](https://github.com/cosmos/cosmos-sdk/blob/main/UPGRADING.md) + return app.ModuleManager.RunMigrations(ctx, app.Configurator(), fromVM) }, )