Skip to content

Commit

Permalink
adding upgrade handler
Browse files Browse the repository at this point in the history
  • Loading branch information
olegfomenko committed Apr 18, 2024
1 parent 36a74f9 commit cde7e62
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit cde7e62

Please sign in to comment.