• Martin Holst Swende's avatar
    all: remove deprecated uses of math.rand (#26710) · 4d352561
    Martin Holst Swende authored
    This PR is a (superior) alternative to https://github.com/ethereum/go-ethereum/pull/26708, it handles deprecation, primarily two specific cases. 
    
    `rand.Seed` is typically used in two ways
    - `rand.Seed(time.Now().UnixNano())` -- we seed it, just to be sure to get some random, and not always get the same thing on every run. This is not needed, with global seeding, so those are just removed. 
    - `rand.Seed(1)` this is typically done to ensure we have a stable test. If we rely on this, we need to fix up the tests to use a deterministic prng-source. A few occurrences like this has been replaced with a proper custom source. 
    
    `rand.Read` has been replaced by `crypto/rand`.`Read` in this PR. 
    4d352561
Name
Last commit
Last update
..
discover Loading commit data...
dnsdisc Loading commit data...
enode Loading commit data...
enr Loading commit data...
msgrate Loading commit data...
nat Loading commit data...
netutil Loading commit data...
nodestate Loading commit data...
rlpx Loading commit data...
simulations Loading commit data...
tracker Loading commit data...
dial.go Loading commit data...
dial_test.go Loading commit data...
message.go Loading commit data...
message_test.go Loading commit data...
metrics.go Loading commit data...
peer.go Loading commit data...
peer_error.go Loading commit data...
peer_test.go Loading commit data...
protocol.go Loading commit data...
server.go Loading commit data...
server_test.go Loading commit data...
transport.go Loading commit data...
transport_test.go Loading commit data...
util.go Loading commit data...
util_test.go Loading commit data...