mirror of
https://github.com/tendermint/tendermint.git
synced 2026-04-10 10:49:11 +00:00
fixed import order; using crypto rand
This commit is contained in:
@@ -5,19 +5,21 @@
|
||||
package pex
|
||||
|
||||
import (
|
||||
crand "crypto/rand"
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
"math"
|
||||
"math/rand"
|
||||
"net"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/minio/highwayhash"
|
||||
"github.com/tendermint/tendermint/crypto"
|
||||
tmmath "github.com/tendermint/tendermint/libs/math"
|
||||
tmrand "github.com/tendermint/tendermint/libs/rand"
|
||||
"github.com/tendermint/tendermint/libs/service"
|
||||
"github.com/tendermint/tendermint/p2p"
|
||||
"math"
|
||||
"math/rand"
|
||||
"net"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -104,8 +106,7 @@ var hashKey []byte
|
||||
func init() {
|
||||
highwayKeyLength := 32
|
||||
hashKey = make([]byte, highwayKeyLength)
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
rand.Read(hashKey)
|
||||
crand.Read(hashKey)
|
||||
}
|
||||
|
||||
// NewAddrBook creates a new address book.
|
||||
|
||||
Reference in New Issue
Block a user