Skip to content

Commit

Permalink
chore: simplify upgrades (#1811)
Browse files Browse the repository at this point in the history
reuse `onlyModuleMigrations` in upgrade handler.
  • Loading branch information
robert-zaremba authored Feb 13, 2023
1 parent a4e8103 commit 264a782
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ func (app UmeeApp) RegisterUpgradeHandlers(bool) {
app.registerUpgrade3_1to3_3(upgradeInfo)
app.registerUpgrade3_2to3_3(upgradeInfo)
app.registerUpgrade3_3to4_0(upgradeInfo)
app.registerUpgrade4_1(upgradeInfo)
app.registerUpgrade4_0_1(upgradeInfo)
app.registerUpgrade4_1(upgradeInfo)
}

// performs upgrade from v4.0 to v4.1
Expand All @@ -54,10 +54,7 @@ func (app *UmeeApp) registerUpgrade4_0_1(_ upgradetypes.Plan) {
const planName = "v4.0.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 fromVM, nil
})
onlyModuleMigrations(app, planName))
}

// performs upgrade from v3.3 -> v4
Expand Down

0 comments on commit 264a782

Please sign in to comment.