Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(x/staking)!: continue instead of panic on validator.Jailed #20059

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i
* Additionally, to reflect this change, the module manager does not take a codec either.
* (runtime) [#19747](https://github.com/cosmos/cosmos-sdk/pull/19747) `runtime.ValidatorAddressCodec` and `runtime.ConsensusAddressCodec` have been moved to `core`.
* (baseapp) [#19993](https://github.com/cosmos/cosmos-sdk/pull/19993) Indicate pruning with error code "not found" rather than "invalid request".
* (x/staking) [#20059](https://github.com/cosmos/cosmos-sdk/pull/20059) Continue iteration if jailed validator is found in `ApplyAndReturnValidatorSetUpdates` instead of panic.
Reecepbcups marked this conversation as resolved.
Show resolved Hide resolved

### Client Breaking Changes

Expand Down
3 changes: 2 additions & 1 deletion x/staking/keeper/val_state_change.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ func (k Keeper) ApplyAndReturnValidatorSetUpdates(ctx context.Context) ([]appmod
}

if validator.Jailed {
return nil, fmt.Errorf("should never retrieve a jailed validator from the power store")
// should never retrieve a jailed validator from the power store
continue
}

// if we get to a zero-power validator (which we don't bond),
Expand Down
Loading