Skip to content

Commit 388879c

Browse files
mergify[bot]alpejulienrbrt
authored
fix(sims): Skip sims test when running dry on validators (backport #21906) (#21909)
Co-authored-by: Alexander Peters <[email protected]> Co-authored-by: Julien Robert <[email protected]>
1 parent 9923c45 commit 388879c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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)