go-ethereum/p2p/enode
Felix Lange cc9e2bd9dd
p2p/enode: fix endpoint determination for IPv6 (#29801)
enode.Node has separate accessor functions for getting the IP, UDP port and TCP port.
These methods performed separate checks for attributes set in the ENR.

With this PR, the accessor methods will now return cached information, and the endpoint is
determined when the node is created. The logic to determine the preferred endpoint is now
more correct, and considers how 'global' each address is when both IPv4 and IPv6 addresses
are present in the ENR.
2024-05-23 14:27:03 +02:00
..
idscheme.go p2p/enode: fix endpoint determination for IPv6 (#29801) 2024-05-23 14:27:03 +02:00
idscheme_test.go all: new p2p node representation (#17643) 2018-09-25 00:59:00 +02:00
iter.go p2p/enode: implement per-source timeout in FairMix (#25962) 2022-11-08 12:12:36 +01:00
iter_test.go p2p: initialize maps with known size (#27229) 2023-05-10 10:52:26 +02:00
localnode.go p2p/enode: store local port number as uint16 (#23926) 2021-11-23 15:14:08 +01:00
localnode_test.go all: remove deprecated uses of math.rand (#26710) 2023-02-16 14:36:58 -05:00
node.go p2p/enode: fix endpoint determination for IPv6 (#29801) 2024-05-23 14:27:03 +02:00
node_test.go p2p/enode: fix endpoint determination for IPv6 (#29801) 2024-05-23 14:27:03 +02:00
nodedb.go p2p/enode: fix endpoint determination for IPv6 (#29801) 2024-05-23 14:27:03 +02:00
nodedb_test.go p2p: initialize maps with known size (#27229) 2023-05-10 10:52:26 +02:00
urlv4.go p2p/enode: fix endpoint determination for IPv6 (#29801) 2024-05-23 14:27:03 +02:00
urlv4_test.go p2p/enode: mock DNS resolver in URL parsing test (#20252) 2019-11-07 16:40:37 +01:00