From 10b3d8cbb65dd1e20815269a07aaa768c557986c Mon Sep 17 00:00:00 2001 From: ryanbajollari <54822716+rbajollari@users.noreply.github.com> Date: Thu, 28 Sep 2023 21:01:50 -0400 Subject: [PATCH] chore: Add v0.2.1 upgrade handler (#284) * add 0.2.1 upgrade handler * lint' --- app/upgrades.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/upgrades.go b/app/upgrades.go index 99bdfeb1..25835be5 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -31,6 +31,7 @@ func (app App) RegisterUpgradeHandlers() { app.registerUpgrade0_1_4(upgradeInfo) app.registerUpgrade0_2_0(upgradeInfo) + app.registerUpgrade0_2_1(upgradeInfo) } // performs upgrade from v0.1.3 to v0.1.4 @@ -106,6 +107,16 @@ func (app *App) registerUpgrade0_2_0(upgradeInfo upgradetypes.Plan) { }) } +func (app *App) registerUpgrade0_2_1(_ upgradetypes.Plan) { + const planName = "v0.2.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) + }, + ) +} + // helper function to check if the store loader should be upgraded func (app *App) storeUpgrade(planName string, ui upgradetypes.Plan, stores storetypes.StoreUpgrades) { if ui.Name == planName && !app.UpgradeKeeper.IsSkipHeight(ui.Height) {