From b0b741429f6aa6679f2ae0297c83531cbf96e19c Mon Sep 17 00:00:00 2001 From: Csaba Kiraly Date: Mon, 4 Sep 2023 14:47:18 +0200 Subject: [PATCH] simulation: allow replacing bootstrap node Signed-off-by: Csaba Kiraly --- libp2pdht/private/eth/p2p/discoveryv5/protocol.nim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libp2pdht/private/eth/p2p/discoveryv5/protocol.nim b/libp2pdht/private/eth/p2p/discoveryv5/protocol.nim index 1b83ac3..7a851c6 100644 --- a/libp2pdht/private/eth/p2p/discoveryv5/protocol.nim +++ b/libp2pdht/private/eth/p2p/discoveryv5/protocol.nim @@ -516,11 +516,12 @@ proc registerTalkProtocol*(d: Protocol, protocolId: seq[byte], proc replaceNode(d: Protocol, n: Node) = if n.record notin d.bootstrapRecords: d.routingTable.replaceNode(n) - else: + # else: + # TODO # For now we never remove bootstrap nodes. It might make sense to actually # do so and to retry them only in case we drop to a really low amount of # peers in the routing table. - debug "Message request to bootstrap node failed", src=d.localNode, dst=n + # debug "Message request to bootstrap node failed", src=d.localNode, dst=n proc sendRequest*[T: SomeMessage](d: Protocol, toNode: Node, m: T, reqId: RequestId) =