From 07d123fa74d7f9fd9d7f4125c029d238fb003431 Mon Sep 17 00:00:00 2001 From: Segfault <5221072+Segfaultd@users.noreply.github.com> Date: Mon, 22 Apr 2024 16:41:49 +0200 Subject: [PATCH] Added upgrade handler --- app/app.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/app.go b/app/app.go index 13838e47..04f7956e 100644 --- a/app/app.go +++ b/app/app.go @@ -913,6 +913,11 @@ func (app *App) registerUpgradeHandlers() { return app.mm.RunMigrations(ctx, app.configurator, fromVM) }) + app.UpgradeKeeper.SetUpgradeHandler("v1.6.6", func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + app.Logger().Info("Starting v1.6.6 upgrade") + return app.mm.RunMigrations(ctx, app.configurator, fromVM) + }) + upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk() if err != nil { panic(fmt.Sprintf("failed to read upgrade info from disk %s", err)) @@ -1015,7 +1020,7 @@ func (app *App) registerUpgradeHandlers() { app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades)) } - if upgradeInfo.Name == "v1.6.5" && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) { + if upgradeInfo.Name == "v1.6.6" && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) { storeUpgrades := storetypes.StoreUpgrades{} app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades)) }