From 9f8f4d9d8a7f8e4da0903bd6bdfcd943ebace004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matija=20Martini=C4=87?= Date: Mon, 15 Aug 2022 11:04:52 +0200 Subject: [PATCH] Fix for incorrect upgrade name #399 --- app/app.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/app.go b/app/app.go index 7d29662b..cdf91d76 100644 --- a/app/app.go +++ b/app/app.go @@ -367,6 +367,14 @@ func New( }, ) + // TODO: this is bug. Upgrade names should be as vMAJOR.MINOR like above. + upgradeK.SetUpgradeHandler( + semverVersion, + func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + return app.mm.RunMigrations(ctx, app.configurator, fromVM) + }, + ) + app.UpgradeKeeper = upgradeK // register the staking hooks