Merge PR #4363: invalid 0stake deposit amount in sim

This fixes the "panic: Governance deposit amount must be a valid sdk.Coins amount, is 0stake" that can happen in the simulator if `DepositParams/MinDeposit` samples the integer `0`.
This commit is contained in:
Nicolas Pinto 2019-05-17 13:51:55 -07:00 committed by Alexander Bezobchuk
parent 3153e93446
commit fd9f322b8c
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ var (
return uint64(RandIntBetween(r, 500, 1000))
},
"DepositParams/MinDeposit": func(r *rand.Rand) interface{} {
return sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, int64(r.Intn(1e3)))}
return sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, int64(RandIntBetween(r, 1, 1e3)))}
},
"VotingParams/VotingPeriod": func(r *rand.Rand) interface{} {
return time.Duration(r.Intn(2*172800)) * time.Second