aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/server_test.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@users.noreply.github.com>2019-01-30 00:39:20 +0800
committerGitHub <noreply@github.com>2019-01-30 00:39:20 +0800
commitf0c6f921408d97251b1b554a7ea83d020c70a2da (patch)
tree06d91c1eb9e183859c72da2593dfd3eb098bf594 /p2p/server_test.go
parent74c38902ecec507675e1e9033500addc87e4b7b0 (diff)
downloadgo-tangerine-f0c6f921408d97251b1b554a7ea83d020c70a2da.tar
go-tangerine-f0c6f921408d97251b1b554a7ea83d020c70a2da.tar.gz
go-tangerine-f0c6f921408d97251b1b554a7ea83d020c70a2da.tar.bz2
go-tangerine-f0c6f921408d97251b1b554a7ea83d020c70a2da.tar.lz
go-tangerine-f0c6f921408d97251b1b554a7ea83d020c70a2da.tar.xz
go-tangerine-f0c6f921408d97251b1b554a7ea83d020c70a2da.tar.zst
go-tangerine-f0c6f921408d97251b1b554a7ea83d020c70a2da.zip
p2p/discover, p2p/enode: rework endpoint proof handling, packet logging (#18963)
This change resolves multiple issues around handling of endpoint proofs. The proof is now done separately for each IP and completing the proof requires a matching ping hash. Also remove waitping because it's equivalent to sleep. waitping was slightly more efficient, but that may cause issues with findnode if packets are reordered and the remote end sees findnode before pong. Logging of received packets was hitherto done after handling the packet, which meant that sent replies were logged before the packet that generated them. This change splits up packet handling into 'preverify' and 'handle'. The error from 'preverify' is logged, but 'handle' happens after the message is logged. This fixes the order. Packet logs now contain the node ID.
Diffstat (limited to 'p2p/server_test.go')
0 files changed, 0 insertions, 0 deletions