From 3b063d8ec41d69da257550ab552adb2fcd5d3221 Mon Sep 17 00:00:00 2001 From: sampocs Date: Sat, 14 Oct 2023 16:48:10 -0500 Subject: [PATCH] threw error if host zone not found in upgrade handler --- app/upgrades/v16/upgrades.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/upgrades/v16/upgrades.go b/app/upgrades/v16/upgrades.go index 0ba934b2f8..e8df3d8372 100644 --- a/app/upgrades/v16/upgrades.go +++ b/app/upgrades/v16/upgrades.go @@ -7,6 +7,7 @@ import ( ratelimitkeeper "github.com/Stride-Labs/stride/v15/x/ratelimit/keeper" stakeibckeeper "github.com/Stride-Labs/stride/v15/x/stakeibc/keeper" + stakeibctypes "github.com/Stride-Labs/stride/v15/x/stakeibc/types" ) var ( @@ -30,12 +31,12 @@ func CreateUpgradeHandler( ctx.Logger().Info("Unhalting Cosmos Hub...") hostZone, found := stakeibcKeeper.GetHostZone(ctx, CosmosHubChainId) if !found { - ctx.Logger().Error("Cosmos Hub host zone not found!") - } else { - hostZone.Halted = false - stakeibcKeeper.SetHostZone(ctx, hostZone) + return vm, stakeibctypes.ErrHostZoneNotFound.Wrap(CosmosHubChainId) } + hostZone.Halted = false + stakeibcKeeper.SetHostZone(ctx, hostZone) + // remove stuatom from rate limits ctx.Logger().Info("Removing stuatom as a blacklisted asset...") ratelimitKeeper.RemoveDenomFromBlacklist(ctx, CosmosHubStToken)