mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
parent
07399bc552
commit
31f5c7da88
6 changed files with 0 additions and 9 deletions
|
|
@ -3,7 +3,6 @@ package lendingstate
|
|||
import (
|
||||
"fmt"
|
||||
"math/big"
|
||||
"math/rand"
|
||||
"os"
|
||||
"testing"
|
||||
"time"
|
||||
|
|
@ -521,7 +520,6 @@ func sendOrder(nonce uint64) {
|
|||
os.Exit(1)
|
||||
}
|
||||
defer rpcClient.Close()
|
||||
rand.Seed(time.Now().UTC().UnixNano())
|
||||
item := &LendingOrderMsg{
|
||||
AccountNonce: nonce,
|
||||
Quantity: EtherToWei(big.NewInt(1000)),
|
||||
|
|
|
|||
|
|
@ -81,7 +81,6 @@ func randomHash() common.Hash {
|
|||
letterBytes := "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789"
|
||||
var b common.Hash
|
||||
for i := range b {
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
b[i] = letterBytes[rand.Intn(len(letterBytes))]
|
||||
}
|
||||
return b
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ import (
|
|||
"math/big"
|
||||
"math/rand"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/XinFinOrg/XDPoSChain/accounts/abi/bind"
|
||||
"github.com/XinFinOrg/XDPoSChain/accounts/abi/bind/backends"
|
||||
|
|
@ -121,7 +120,6 @@ func randomHash() common.Hash {
|
|||
letterBytes := "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789"
|
||||
var b common.Hash
|
||||
for i := range b {
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
b[i] = letterBytes[rand.Intn(len(letterBytes))]
|
||||
}
|
||||
return b
|
||||
|
|
@ -170,7 +168,6 @@ func isArrayEqual(a [][]int64, b [][]int64) bool {
|
|||
func TestGenM2FromRandomize(t *testing.T) {
|
||||
var a []int64
|
||||
for i := 0; i <= 10; i++ {
|
||||
rand.Seed(time.Now().UTC().UnixNano())
|
||||
a = append(a, int64(rand.Intn(9999)))
|
||||
}
|
||||
b, err := GenM2FromRandomize(a, common.MaxMasternodes)
|
||||
|
|
|
|||
|
|
@ -131,7 +131,6 @@ func TestRewardBalance(t *testing.T) {
|
|||
}
|
||||
logCaps := make(map[int]*logCap)
|
||||
for i := 0; i <= 10; i++ {
|
||||
rand.Seed(time.Now().UTC().UnixNano())
|
||||
randIndex := rand.Intn(len(accounts))
|
||||
randCap := rand.Intn(10) * 1000
|
||||
if randCap <= 0 {
|
||||
|
|
|
|||
|
|
@ -100,7 +100,6 @@ func TestSubscribeDuplicateType(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestMuxConcurrent(t *testing.T) {
|
||||
rand.Seed(time.Now().Unix())
|
||||
mux := new(TypeMux)
|
||||
defer mux.Stop()
|
||||
|
||||
|
|
|
|||
|
|
@ -147,7 +147,6 @@ func TestUDP_responseTimeouts(t *testing.T) {
|
|||
test := newUDPTest(t)
|
||||
defer test.table.Close()
|
||||
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
randomDuration := func(max time.Duration) time.Duration {
|
||||
return time.Duration(rand.Int63n(int64(max)))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue