mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-08 00:43:06 +00:00
fix: nodes in AddressBook are not necessarily connected (#1161)
This commit is contained in:
parent
f73477be6e
commit
9be3d296be
@ -707,7 +707,7 @@ proc runDiscv5Loop(node: WakuNode) {.async.} =
|
||||
trace "Discovered peers", count=discoveredPeers.get().len()
|
||||
|
||||
let newPeers = discoveredPeers.get().filterIt(
|
||||
not node.switch.peerStore[AddressBook].contains(it.peerId))
|
||||
not node.switch.isConnected(it.peerId))
|
||||
|
||||
if newPeers.len > 0:
|
||||
debug "Connecting to newly discovered peers", count=newPeers.len()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user