mirror of https://github.com/waku-org/nwaku.git
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…
Reference in New Issue