bsc/p2p/discover
Martin Holst Swende 4d3525610e
all: remove deprecated uses of math.rand (#26710)
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.
2023-02-16 14:36:58 -05:00
..
v4wire all: fix docstrings 2022-10-04 09:18:02 +02:00
v5wire p2p/discover: add more packet information in logs (#26307) 2023-01-03 12:36:38 +01:00
common.go p2p/discover: add config option for discv5 protocol ID (#26041) 2022-11-30 22:03:34 +01:00
lookup.go p2p: use errors.Is for error comparison (#24882) 2022-06-07 17:27:21 +02:00
node.go p2p/discover: implement v5.1 wire protocol (#21647) 2020-10-14 12:28:17 +02:00
ntp.go p2p/discover: fix typos in comments (#25272) 2022-07-10 10:15:54 +02:00
table_test.go p2p/discover: improve nodesByDistance.push code (#26019) 2022-12-07 23:31:47 +01:00
table_util_test.go p2p/discover: fix typos in comments (#25272) 2022-07-10 10:15:54 +02:00
table.go p2p/discover: improve nodesByDistance.push code (#26019) 2022-12-07 23:31:47 +01:00
v4_lookup_test.go p2p/discover: implement v5.1 wire protocol (#21647) 2020-10-14 12:28:17 +02:00
v4_udp_test.go all: remove deprecated uses of math.rand (#26710) 2023-02-16 14:36:58 -05:00
v4_udp.go all: fix some typos (#25551) 2022-08-19 09:00:21 +03:00
v5_udp_test.go p2p/discover: add more packet information in logs (#26307) 2023-01-03 12:36:38 +01:00
v5_udp.go p2p/discover: add more packet information in logs (#26307) 2023-01-03 12:36:38 +01:00