Skip to content

Commit 5dcbb4f

Browse files
mergify[bot]alpejulienrbrt
authored andcommitted
fix(sims): Skip sims test when running dry on validators (backport cosmos#21906) (cosmos#21910)
Co-authored-by: Alexander Peters <alpe@users.noreply.github.com> Co-authored-by: Julien Robert <julien@rbrt.fr>
1 parent 6b5e8c3 commit 5dcbb4f

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
4444

4545
### Bug Fixes
4646

47+
* (sims) [21906](https://github.com/cosmos/cosmos-sdk/pull/21906) Skip sims test when running dry on validators
4748
* (cli) [#21919](https://github.com/cosmos/cosmos-sdk/pull/21919) Query address-by-acc-num by account_id instead of id.
4849

4950
## [v0.50.10](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.10) - 2024-09-20

x/simulation/simulate.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ func SimulateFromSeed(
105105

106106
accs = tmpAccs
107107
nextValidators := validators
108+
if len(nextValidators) == 0 {
109+
tb.Skip("skipping: empty validator set in genesis")
110+
return true, params, nil
111+
}
108112

109113
var (
110114
pastTimes []time.Time
@@ -243,6 +247,10 @@ func SimulateFromSeed(
243247
// on the next block
244248
validators = nextValidators
245249
nextValidators = updateValidators(tb, r, params, validators, res.ValidatorUpdates, eventStats.Tally)
250+
if len(nextValidators) == 0 {
251+
tb.Skip("skipping: empty validator set")
252+
return true, params, nil
253+
}
246254

247255
// update the exported params
248256
if config.ExportParamsPath != "" && int64(config.ExportParamsHeight) == blockHeight {

0 commit comments

Comments
 (0)