les: generate random nums directly, not via strange conversions
This commit is contained in:
@ -18,8 +18,6 @@ package les
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/rand"
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
"sync"
|
||||
"time"
|
||||
@ -430,10 +428,3 @@ func (r *sentReq) stop(err error) {
|
||||
func (r *sentReq) getError() error {
|
||||
return r.err
|
||||
}
|
||||
|
||||
// genReqID generates a new random request ID
|
||||
func genReqID() uint64 {
|
||||
var rnd [8]byte
|
||||
rand.Read(rnd[:])
|
||||
return binary.BigEndian.Uint64(rnd[:])
|
||||
}
|
||||
|
Reference in New Issue
Block a user