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) (#21909)

Co-authored-by: Alexander Peters <alpe@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
  • Loading branch information
3 people authored Sep 25, 2024
1 parent 9923c45 commit 388879c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions x/simulation/simulate.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ func SimulateFromSeedX(
return blockedAddrs[acc.AddressBech32]
})
nextValidators := validators
if len(nextValidators) == 0 {
tb.Skip("skipping: empty validator set in genesis")
return params, accs, nil
}

var (
pastTimes []time.Time
Expand Down Expand Up @@ -264,6 +268,10 @@ func SimulateFromSeedX(
// 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 exportedParams, accs, err
}

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

0 comments on commit 388879c

Please sign in to comment.