Skip to content

Commit

Permalink
fix(sims): Skip sims test when running dry on validators (backport #2…
Browse files Browse the repository at this point in the history
…1906) (#21910)

Co-authored-by: Alexander Peters <[email protected]>
Co-authored-by: Julien Robert <[email protected]>
  • Loading branch information
3 people authored Sep 26, 2024
1 parent 2609f9c commit bcd31a1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions x/simulation/simulate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit bcd31a1

Please sign in to comment.