mirror of https://github.com/status-im/nim-eth.git
kademlia: turn exception into warning
This commit is contained in:
parent
d0d09559b8
commit
12f2a87de3
|
@ -189,7 +189,9 @@ proc removeNode(r: var RoutingTable, n: Node) =
|
|||
r.bucketForNode(n).removeNode(n)
|
||||
|
||||
proc addNode(r: var RoutingTable, n: Node): Node =
|
||||
doAssert(n != r.thisNode)
|
||||
if n == r.thisNode:
|
||||
warn "Trying to add ourselves to the routing table", node = n
|
||||
return
|
||||
let bucket = r.bucketForNode(n)
|
||||
let evictionCandidate = bucket.add(n)
|
||||
if not evictionCandidate.isNil:
|
||||
|
|
Loading…
Reference in New Issue