From 9b2e04ae3c2caeaf47ea576119f03efc043a8fad Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 31 Dec 2022 14:21:04 -0500 Subject: [PATCH] *switch to _seenTopics since they are stored in hex already --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 6871d29..cda3a7f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -162,7 +162,7 @@ export default class DHTFlood extends EventEmitter { let topicString = this.topic.toString("hex"); let peers: Buffer[] = [...this.swarm.peers.values()] - .filter((peerInfo: any) => peerInfo.topics.includes(topicString)) + .filter((peerInfo: any) => peerInfo._seenTopics.has(topicString)) .map((peerInfo) => peerInfo.publicKey); for (const peer of peers) {