From 43517e7b81cf4aaf2a589407bda94f02b8cdb219 Mon Sep 17 00:00:00 2001 From: rbajollari Date: Fri, 19 Jul 2024 11:51:22 +0200 Subject: [PATCH] chore: v0.3.2 upgrade handler (backport #481) --- app/upgrades.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/upgrades.go b/app/upgrades.go index 74fb4e00..57b7a56d 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -40,6 +40,7 @@ func (app App) RegisterUpgradeHandlers() { app.registerUpgrade0_3_1Rc1(upgradeInfo) app.registerUpgrade0_3_1Rc2(upgradeInfo) app.registerUpgrade0_3_1(upgradeInfo) + app.registerUpgrade0_3_2(upgradeInfo) } // performs upgrade from v0.1.3 to v0.1.4 @@ -188,6 +189,17 @@ func (app *App) registerUpgrade0_3_1Rc2(_ upgradetypes.Plan) { func (app *App) registerUpgrade0_3_1(_ upgradetypes.Plan) { const planName = "v0.3.1" + app.UpgradeKeeper.SetUpgradeHandler(planName, + func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + ctx.Logger().Info("Upgrade handler execution", "name", planName) + return app.mm.RunMigrations(ctx, app.configurator, fromVM) + }, + ) +} + +func (app *App) registerUpgrade0_3_2(_ upgradetypes.Plan) { + const planName = "v0.3.2" + app.UpgradeKeeper.SetUpgradeHandler(planName, func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { // migrate old proposals