Skip to content

Commit

Permalink
register upgrade handler for v0.32.0
Browse files Browse the repository at this point in the history
  • Loading branch information
farbanas committed Jul 5, 2023
1 parent 66bf7cf commit 33002cb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -993,6 +993,11 @@ func (app *WasmApp) registerUpgradeHandlers(icaModule ica.AppModule) {

return app.mm.RunMigrations(ctx, app.configurator, fromVM)
})

app.UpgradeKeeper.SetUpgradeHandler("v0.32.0",
func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
return app.mm.RunMigrations(ctx, app.configurator, fromVM)
})
}

func (app *WasmApp) registerStoreUpgrades(upgradeInfo storetypes.UpgradeInfo) {
Expand All @@ -1010,6 +1015,10 @@ func (app *WasmApp) registerStoreUpgrades(upgradeInfo storetypes.UpgradeInfo) {
// configure store loader that checks if version == upgradeHeight and applies store upgrades
app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades))
}

if upgradeInfo.Name == "v0.32.0" && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) {
// do nothing, there are no store upgrades for this version, keeping this as a log
}
}

// overrideWasmVariables overrides the wasm variables to:
Expand Down

0 comments on commit 33002cb

Please sign in to comment.