From 0bd6b2cf9485545dbff19d2387e8bd8d1dc7759e Mon Sep 17 00:00:00 2001 From: ylsGit Date: Mon, 15 Jan 2024 14:36:00 +0800 Subject: [PATCH] Merge PR: fix maxValidators (#3282) --- x/staking/keeper/keeper_ibc_adapter.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x/staking/keeper/keeper_ibc_adapter.go b/x/staking/keeper/keeper_ibc_adapter.go index 658191530e..e865dc74c3 100644 --- a/x/staking/keeper/keeper_ibc_adapter.go +++ b/x/staking/keeper/keeper_ibc_adapter.go @@ -84,7 +84,8 @@ func (k Keeper) GetLastValidators(ctx sdk.Context) (validators []outtypes.Valida // sanity check if i >= int(maxValidators) { - panic("more validators than maxValidators found") + break + //panic("more validators than maxValidators found") } address := types.AddressFromLastValidatorPowerKey(iterator.Key()) validator := k.mustGetValidator(ctx, address)