From 9333ab7a38b5c9204e7ca3ff2b0324cdea28fcd7 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 31 Dec 2022 14:21:32 -0500 Subject: [PATCH] *Update dist --- dist/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index adcd4b0..c035e1a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -123,11 +123,11 @@ class DHTFlood extends events_1.default { const { id, messageNumber } = this; let topicString = this.topic.toString("hex"); let peers = [...this.swarm.peers.values()] - .filter((peerInfo) => peerInfo.topics.includes(topicString)) + .filter((peerInfo) => peerInfo._seenTopics.has(topicString)) .map((peerInfo) => peerInfo.publicKey); for (const peer of peers) { const conn = this.swarm._allConnections.get(peer); - if (conn) { + if (!conn) { continue; } const message = this.setupPeer(conn);