Skip to content

Commit bff258e

Browse files
committed
add upgrade handler
1 parent 18b7ca5 commit bff258e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

app/app.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,13 @@ func (app *App) RegisterTendermintService(clientCtx client.Context) {
839839

840840
// RegisterUpgradeHandlers returns upgrade handlers
841841

842-
func (app *App) RegisterUpgradeHandlers(cfg module.Configurator) {}
842+
func (app *App) RegisterUpgradeHandlers(cfg module.Configurator) {
843+
app.UpgradeKeeper.SetUpgradeHandler("MigrateTraces",
844+
func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
845+
// transfer module consensus version has been bumped to 2
846+
return app.mm.RunMigrations(ctx, cfg, fromVM)
847+
})
848+
}
843849

844850
// GetMaccPerms returns a copy of the module account permissions
845851
func GetMaccPerms() map[string][]string {

0 commit comments

Comments
 (0)