Skip to content

Commit

Permalink
Merge PR cosmos#5385: fix int overflow error for rand.Intn
Browse files Browse the repository at this point in the history
  • Loading branch information
noandrea authored and alexanderbez committed Dec 12, 2019
1 parent 96b384b commit d58bf90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion simapp/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func AppStateRandomizedFn(
var initialStake, numInitiallyBonded int64
appParams.GetOrGenerate(
cdc, StakePerAccount, &initialStake, r,
func(r *rand.Rand) { initialStake = int64(r.Intn(1e12)) },
func(r *rand.Rand) { initialStake = r.Int63n(1e12) },
)
appParams.GetOrGenerate(
cdc, InitiallyBondedValidators, &numInitiallyBonded, r,
Expand Down

0 comments on commit d58bf90

Please sign in to comment.