Skip to content

Commit

Permalink
fix: adding peer exchange peers to the peerStore
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielmer committed Jun 19, 2024
1 parent 93e9ba2 commit e41aa57
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions waku/factory/node_factory.nim
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,12 @@ proc setupProtocols(
# only peers with populated records
.mapIt(toRemotePeerInfo(it.record.get()))

debug "connecting to exchanged peers",
debug "adding exchanged peers",
src = peer, topic = topic, numPeers = exchangedPeers.len

# asyncSpawn, as we don't want to block here
asyncSpawn node.connectToNodes(exchangedPeers, "peer exchange")
for peer in exchangedPeers:
# Peers added are filtered by the peer manager
node.peerManager.addPeer(peer, PeerOrigin.PeerExchange)

peerExchangeHandler = some(handlePeerExchange)

Expand Down

0 comments on commit e41aa57

Please sign in to comment.