mirror of
https://github.com/tendermint/tendermint.git
synced 2026-07-25 17:43:03 +00:00
cmn: fix race condition in prng
This commit is contained in:
+1
-1
@@ -40,7 +40,7 @@ func RandStr(length int) string {
|
||||
chars := []byte{}
|
||||
MAIN_LOOP:
|
||||
for {
|
||||
val := prng.Int63()
|
||||
val := RandInt63()
|
||||
for i := 0; i < 10; i++ {
|
||||
v := int(val & 0x3f) // rightmost 6 bits
|
||||
if v >= 62 { // only 62 characters in strChars
|
||||
|
||||
Reference in New Issue
Block a user