Merge PR #5385: fix int overflow error for rand.Intn

This commit is contained in:
Andrea Giacobino 2019-12-12 16:20:30 +01:00 committed by Alexander Bezobchuk
parent 96b384b269
commit d58bf903f4
1 changed files with 1 additions and 1 deletions

View File

@ -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,