This commit is contained in:
Arnaud 2026-05-06 18:43:52 +04:00
parent a26638bc9e
commit 497782ca3a
No known key found for this signature in database
GPG Key ID: A6C7C781817146FA
2 changed files with 2 additions and 0 deletions

View File

@ -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] =

View File

@ -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()