Skip to content

Commit

Permalink
Another fix IBC client migration
Browse files Browse the repository at this point in the history
  • Loading branch information
luckychess committed Dec 8, 2024
1 parent 8367b8b commit 94002cb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/upgrades/0.2/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@ const Name = "0.1-to-0.2"
func UpgradeHandler(mm *module.Manager, configurator module.Configurator, paramsKeeper paramskeeper.Keeper, consensuskeeper *consensuskeeper.Keeper, clientKeeper ibcclientkeeper.Keeper) upgradetypes.UpgradeHandler {

return func(ctx context.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
newVM, err := mm.RunMigrations(ctx, configurator, vm)
if err != nil {
return nil, err
}
sdkCtx := sdk.UnwrapSDKContext(ctx)
params := clientKeeper.GetParams(sdkCtx)
params.AllowedClients = append(params.AllowedClients, exported.Localhost)
clientKeeper.SetParams(sdkCtx, params)
return mm.RunMigrations(ctx, configurator, vm)
return newVM, nil
}
}

0 comments on commit 94002cb

Please sign in to comment.