Skip to content

Commit

Permalink
fix: adding peer exchange peers to the peerStore (#2824)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielmer authored Jun 20, 2024
1 parent f73968d commit 325e131
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 325e131

Please sign in to comment.