Skip to content

Commit

Permalink
refactor!: revert #20548 - staking enblocker (#20691)
Browse files Browse the repository at this point in the history
  • Loading branch information
MSalopek committed Jun 18, 2024
1 parent 62dd6a3 commit 6593aa3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 1 addition & 2 deletions x/staking/keeper/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 6593aa3

Please sign in to comment.