Skip to content

Commit

Permalink
change upgrade name to use -rc0
Browse files Browse the repository at this point in the history
  • Loading branch information
yun-yeo committed Jul 12, 2021
1 parent 0943940 commit 3d388a2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,9 @@ func NewTerraApp(
app.UpgradeKeeper = upgradekeeper.NewKeeper(skipUpgradeHeights, keys[upgradetypes.StoreKey], appCodec, homePath, app.BaseApp)

// clear SoftwareUpgradeProposal
app.UpgradeKeeper.SetUpgradeHandler("v0.5.0", func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
return app.mm.RunMigrations(ctx, app.configurator, fromVM)
app.UpgradeKeeper.SetUpgradeHandler("v0.5.0-rc0", func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
// Just pass current version map, no migration required
return app.mm.RunMigrations(ctx, app.configurator, app.mm.GetVersionMap())
})

// register the staking hooks
Expand Down Expand Up @@ -610,9 +611,6 @@ func (app *TerraApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abc
panic(err)
}

// store initial module version maps to upgrade keeper
app.UpgradeKeeper.SetModuleVersionMap(ctx, app.mm.GetVersionMap())

return app.mm.InitGenesis(ctx, app.appCodec, genesisState)
}

Expand Down

0 comments on commit 3d388a2

Please sign in to comment.