From 497782ca3aa7ef777775362dc167635abb0f6264 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Wed, 6 May 2026 18:43:52 +0400 Subject: [PATCH] Add logs --- codexdht/private/eth/p2p/discoveryv5/protocol.nim | 1 + codexdht/private/eth/p2p/discoveryv5/transport.nim | 1 + 2 files changed, 2 insertions(+) diff --git a/codexdht/private/eth/p2p/discoveryv5/protocol.nim b/codexdht/private/eth/p2p/discoveryv5/protocol.nim index f36af17..17398c1 100644 --- a/codexdht/private/eth/p2p/discoveryv5/protocol.nim +++ b/codexdht/private/eth/p2p/discoveryv5/protocol.nim @@ -449,6 +449,7 @@ proc handleMessage(d: Protocol, srcId: NodeId, fromAddr: Address, let node = d.routingTable.getNode(srcId) if node.isSome: d.routingTable.removeNode(node.get) + trace "Node removed from routing table after handling message", srcId proc registerTalkProtocol*(d: Protocol, protocolId: seq[byte], protocol: TalkProtocol): DiscResult[void] = diff --git a/codexdht/private/eth/p2p/discoveryv5/transport.nim b/codexdht/private/eth/p2p/discoveryv5/transport.nim index d572e3b..0105ae0 100644 --- a/codexdht/private/eth/p2p/discoveryv5/transport.nim +++ b/codexdht/private/eth/p2p/discoveryv5/transport.nim @@ -235,6 +235,7 @@ proc receive*(t: Transport, a: Address, packet: openArray[byte]) = if packet.message.clientMode: t.client.routingTable.removeNode(node) + trace "Removed node from the routing table after handshake", node, tablesize=t.client.nodesDiscovered() else: if t.client.addNode(node): trace "Added new node to routing table after handshake", node, tablesize=t.client.nodesDiscovered()