mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
Update subscription.go
This commit is contained in:
parent
b19452dc11
commit
7163db134d
1 changed files with 2 additions and 1 deletions
|
|
@ -64,7 +64,8 @@ func randomIDGenerator() func() ID {
|
|||
if _, err := crand.Read(buf); err == nil {
|
||||
seed = int64(binary.BigEndian.Uint64(buf))
|
||||
} else {
|
||||
seed = int64(time.Now().Nanosecond())
|
||||
// Fallback: use UnixNano for higher entropy than Nanosecond-only value
|
||||
seed = time.Now().UnixNano()
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
|
|||
Loading…
Reference in a new issue