From 86b59b8cf22c54f62f3fadcb39045c0dad5c4204 Mon Sep 17 00:00:00 2001 From: ylsGit Date: Thu, 11 Jan 2024 12:08:03 +0800 Subject: [PATCH] fix maxValidators --- 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)