Skip to content

Commit

Permalink
fix for v11 upgrade mainnet.
Browse files Browse the repository at this point in the history
  • Loading branch information
puneet2019 committed Mar 19, 2024
1 parent 92c4760 commit 827d840
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/upgrades/v11.8.0/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ func CreateUpgradeHandler(args upgrades.UpgradeHandlerArgs) upgradetypes.Upgrade
return func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
ctx.Logger().Info("running upgrade handler")

newVM, err := args.ModuleManager.RunMigrations(ctx, args.Configurator, vm)
if err != nil {
panic(err)
}
// make sure this region runs only during CI and mainnet v11 upgrade
if chainID := ctx.ChainID(); chainID == "core-1" || chainID == "ictest-core-1" {
if err := runLiquidstakeUpgradeMigration(ctx, args.Keepers); err != nil {
Expand All @@ -30,7 +34,7 @@ func CreateUpgradeHandler(args upgrades.UpgradeHandlerArgs) upgradetypes.Upgrade
// TODO: more migrations
}

return args.ModuleManager.RunMigrations(ctx, args.Configurator, vm)
return newVM, nil
}
}

Expand Down

0 comments on commit 827d840

Please sign in to comment.