4cd90e02e2
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. |
||
---|---|---|
.. | ||
idscheme.go | ||
idscheme_test.go | ||
localnode.go | ||
localnode_test.go | ||
node.go | ||
node_test.go | ||
nodedb.go | ||
nodedb_test.go | ||
urlv4.go | ||
urlv4_test.go |