From d58bf903f41bff183fe8fad262f51840e2d71d28 Mon Sep 17 00:00:00 2001 From: Andrea Giacobino Date: Thu, 12 Dec 2019 16:20:30 +0100 Subject: [PATCH] Merge PR #5385: fix int overflow error for rand.Intn --- simapp/state.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simapp/state.go b/simapp/state.go index 22a4e53a6..8815784b0 100644 --- a/simapp/state.go +++ b/simapp/state.go @@ -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,