Skip to content

Commit

Permalink
rename upgrade handler from 1.0.0 to 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kstoykov committed Nov 14, 2022
1 parent 06dd1ff commit 5224534
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,9 @@ func New(
)
app.UpgradeKeeper = upgradekeeper.NewKeeper(skipUpgradeHeights, keys[upgradetypes.StoreKey], appCodec, homePath, app.BaseApp)

app.UpgradeKeeper.SetUpgradeHandler("v1.0.0", func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter())

app.UpgradeKeeper.SetUpgradeHandler("v1.0", func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
ss, ok := app.ParamsKeeper.GetSubspace(cudoMinttypes.ModuleName)
if ok {
bpd := ss.GetRaw(ctx, []byte("BlocksPerDay"))
Expand All @@ -367,13 +369,6 @@ func New(
return fromVM, nil
})

app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter())

const upgradeVersion string = "v1.0.1"
app.UpgradeKeeper.SetUpgradeHandler(upgradeVersion, func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
return fromVM, nil
})

// register the staking hooks
// NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks
app.StakingKeeper = *stakingKeeper.SetHooks(
Expand Down

0 comments on commit 5224534

Please sign in to comment.