From cde7e6238d7475c9ec130e218c80130c4a55dc55 Mon Sep 17 00:00:00 2001 From: olegfomenko Date: Thu, 18 Apr 2024 14:53:51 +0300 Subject: [PATCH] adding upgrade handler --- app/app.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/app.go b/app/app.go index 614800b8..80b2429a 100644 --- a/app/app.go +++ b/app/app.go @@ -1023,6 +1023,19 @@ func New( }, ) + if upgradeInfo.Name == "v1.1.1-rc0" && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) { + app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storetypes.StoreUpgrades{ + Added: []string{cscalisttypes.ModuleName}, + })) + } + + app.UpgradeKeeper.SetUpgradeHandler( + "v1.1.1-rc0", + func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + return app.mm.RunMigrations(ctx, app.configurator, fromVM) + }, + ) + if loadLatest { if err := app.LoadLatestVersion(); err != nil { tmos.Exit(err.Error())