From 2c3c483078515a4bc7319a047a393feb505eec2a Mon Sep 17 00:00:00 2001 From: forcodedancing Date: Mon, 22 Jan 2024 12:38:53 +0800 Subject: [PATCH] fix: module consensus version is not correctly set when upgrade after state sync --- x/upgrade/keeper/keeper.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/x/upgrade/keeper/keeper.go b/x/upgrade/keeper/keeper.go index e4aa18f03b..ed2c7cdf79 100644 --- a/x/upgrade/keeper/keeper.go +++ b/x/upgrade/keeper/keeper.go @@ -324,6 +324,12 @@ func (k Keeper) HasHandler(name string) bool { // ApplyUpgrade will execute the handler associated with the Plan and mark the plan as done. func (k Keeper) ApplyUpgrade(ctx sdk.Context, plan types.Plan) { + err := k.InitUpgraded(ctx) + if err != nil { + ctx.Logger().Error("failed to init upgraded", "err", err) + return + } + initializer := k.upgradeInitializer[plan.Name] if initializer != nil {