This website works better with JavaScript.
Home
Help
Sign In
zolfa
/
tendermint
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Projects
0
Releases
221
Wiki
Activity
Browse Source
cmn: fix race condition in prng
pull/1842/head
Ethan Buchman
7 years ago
parent
c8ddf156a7
commit
a25ed5ba1b
1 changed files
with
1 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
common/random.go
+ 1
- 1
common/random.go
View File
@ -40,7 +40,7 @@ func RandStr(length int) string {
chars
:=
[
]
byte
{
}
MAIN_LOOP
:
for
{
val
:=
prng
.
Int63
(
)
val
:=
Rand
Int63
(
)
for
i
:=
0
;
i
<
10
;
i
++
{
v
:=
int
(
val
&
0x3f
)
// rightmost 6 bits
if
v
>=
62
{
// only 62 characters in strChars
Write
Preview
Loading…
Cancel
Save