Skip to content

Commit

Permalink
prevent sim from starting with zero validators (#5935)
Browse files Browse the repository at this point in the history
  • Loading branch information
czarcas7ic authored Aug 1, 2023
1 parent 6e18969 commit a907df0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/simulator/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ func AppStateRandomizedFn(
// generate a random amount of initial stake coins and a random initial
// number of bonded accounts
initialStake := r.Int63n(1e12)
numInitiallyBonded := int64(r.Intn(300))
// Don't allow 0 validators to start off with
numInitiallyBonded := int64(rand.Intn(299)) + 1

if numInitiallyBonded > numAccs {
numInitiallyBonded = numAccs
Expand Down

0 comments on commit a907df0

Please sign in to comment.