From 653fa42f0b49843f80a2b8b450247a15f3e5987c Mon Sep 17 00:00:00 2001 From: MSalopek Date: Mon, 17 Jun 2024 11:00:05 +0200 Subject: [PATCH 1/2] refactor!: revert #20548 - staking enblocker --- x/staking/keeper/validator.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/x/staking/keeper/validator.go b/x/staking/keeper/validator.go index 7eb19e6833a2..d1315ed7793f 100644 --- a/x/staking/keeper/validator.go +++ b/x/staking/keeper/validator.go @@ -323,8 +323,7 @@ func (k Keeper) GetLastValidators(ctx sdk.Context) (validators []types.Validator for ; iterator.Valid(); iterator.Next() { // sanity check if i >= int(maxValidators) { - k.Logger(ctx).Info("more validators than maxValidators found") - break + panic("more validators than maxValidators found") } address := types.AddressFromLastValidatorPowerKey(iterator.Key()) From c352ba55f1cf7a42ca2253e4e5e7c95e09f0ebfa Mon Sep 17 00:00:00 2001 From: MSalopek Date: Mon, 17 Jun 2024 12:43:24 +0200 Subject: [PATCH 2/2] docs: update changelog files --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3326cf0798a8..0a8f058edfa1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,12 @@ Ref: https://keepachangelog.com/en/1.0.0/ # Changelog +## v0.47.16-ics-lsm + +### Bugfixes + +* (staking) [#20691](https://github.com/cosmos/cosmos-sdk/pull/20691) Revert staking GetLastValidators - revert [#20548](https://github.com/cosmos/cosmos-sdk/pull/20548). + ## v0.47.15-ics-lsm This is a special cosmos-sdk release with support for both ICS and LSM.