simulation: allow replacing bootstrap node

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
Csaba Kiraly 2023-09-04 14:47:18 +02:00
parent 8dc1ee5ac3
commit b0b741429f
No known key found for this signature in database
GPG Key ID: 0FE274EE8C95166E
1 changed files with 3 additions and 2 deletions

View File

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