From d5dee6c367ab22c9394a425ee84de98d71a66927 Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Tue, 29 Oct 2024 11:45:17 -0400 Subject: [PATCH] fix(x/swingset): Let migration see the missing param pairs --- golang/cosmos/x/swingset/keeper/keeper.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/golang/cosmos/x/swingset/keeper/keeper.go b/golang/cosmos/x/swingset/keeper/keeper.go index dcd4790c4450..385cc482d038 100644 --- a/golang/cosmos/x/swingset/keeper/keeper.go +++ b/golang/cosmos/x/swingset/keeper/keeper.go @@ -246,7 +246,10 @@ func (k Keeper) BlockingSend(ctx sdk.Context, action vm.Action) (string, error) } func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { - k.paramSpace.GetParamSet(ctx, ¶ms) + // Note the use of "IfExists"... + // migration fills in missing data with defaults, + // so it is the only consumer that should ever see a nil pair. + k.paramSpace.GetParamSetIfExists(ctx, ¶ms) return params }