fix(sims): Skip sims test when running dry on validators (backport #21906) (#21910)

Co-authored-by: Alexander Peters <alpe@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
mergify[bot] 2024-09-26 09:58:40 +02:00 committed by GitHub
parent 2609f9c55e
commit bcd31a16ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 0 deletions

View File

@ -44,6 +44,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Bug Fixes
* (sims) [21906](https://github.com/cosmos/cosmos-sdk/pull/21906) Skip sims test when running dry on validators
* (cli) [#21919](https://github.com/cosmos/cosmos-sdk/pull/21919) Query address-by-acc-num by account_id instead of id.
## [v0.50.10](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.10) - 2024-09-20

View File

@ -105,6 +105,10 @@ func SimulateFromSeed(
accs = tmpAccs
nextValidators := validators
if len(nextValidators) == 0 {
tb.Skip("skipping: empty validator set in genesis")
return true, params, nil
}
var (
pastTimes []time.Time
@ -243,6 +247,10 @@ func SimulateFromSeed(
// on the next block
validators = nextValidators
nextValidators = updateValidators(tb, r, params, validators, res.ValidatorUpdates, eventStats.Tally)
if len(nextValidators) == 0 {
tb.Skip("skipping: empty validator set")
return true, params, nil
}
// update the exported params
if config.ExportParamsPath != "" && int64(config.ExportParamsHeight) == blockHeight {