Skip to content

Commit

Permalink
fix: hardfork
Browse files Browse the repository at this point in the history
  • Loading branch information
BarryTong65 committed May 28, 2024
1 parent ed346a6 commit c3f8a6c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions app/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func (app *App) RegisterUpgradeHandlers(chainID string, serverCfg *serverconfig.
app.registerPawneeUpgradeHandler()
app.registerSerengetiUpgradeHandler()
app.registerErdosUpgradeHandler()
app.registerVeldUpgradeHandler()
// app.register...()
// ...
return nil
Expand Down Expand Up @@ -262,3 +263,19 @@ func (app *App) registerErdosUpgradeHandler() {
return nil
})
}

func (app *App) registerVeldUpgradeHandler() {
// Register the upgrade handler
app.UpgradeKeeper.SetUpgradeHandler(upgradetypes.Veld,
func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
app.Logger().Info("upgrade to ", plan.Name)
return app.mm.RunMigrations(ctx, app.configurator, fromVM)
})

// Register the upgrade initializer
app.UpgradeKeeper.SetUpgradeInitializer(upgradetypes.Veld,
func() error {
app.Logger().Info("Init Veld upgrade")
return nil
})
}

0 comments on commit c3f8a6c

Please sign in to comment.