Skip to content

Commit 3856e77

Browse files
authored
fix(sims): Skip sims test when running dry on validators (#21906)
1 parent e52d3b1 commit 3856e77

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i
5555

5656
### Bug Fixes
5757

58+
* (sims) [21906](https://github.com/cosmos/cosmos-sdk/pull/21906) Skip sims test when running dry on validators
59+
5860
### API Breaking Changes
5961

6062
* (types/mempool) [#21744](https://github.com/cosmos/cosmos-sdk/pull/21744) Update types/mempool.Mempool interface to take decoded transactions. This avoid to decode the transaction twice.

x/simulation/simulate.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ func SimulateFromSeedX(
130130
return blockedAddrs[acc.AddressBech32]
131131
})
132132
nextValidators := validators
133+
if len(nextValidators) == 0 {
134+
tb.Skip("skipping: empty validator set in genesis")
135+
return params, accs, nil
136+
}
133137

134138
var (
135139
pastTimes []time.Time
@@ -264,6 +268,10 @@ func SimulateFromSeedX(
264268
// on the next block
265269
validators = nextValidators
266270
nextValidators = updateValidators(tb, r, params, validators, res.ValidatorUpdates, eventStats.Tally)
271+
if len(nextValidators) == 0 {
272+
tb.Skip("skipping: empty validator set")
273+
return exportedParams, accs, err
274+
}
267275

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

0 commit comments

Comments
 (0)