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