From 587739334a9ff7f705c283b2a6e7557e8d65703f Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Thu, 24 Nov 2022 01:48:00 -0500 Subject: [PATCH] *filter for peers in neighbors in _getBootstrapInfo --- src/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/index.ts b/src/index.ts index d11c25e..4cfd144 100644 --- a/src/index.ts +++ b/src/index.ts @@ -362,6 +362,9 @@ export default class DHTCache extends EventEmitter { } const connectedTo = this.graph .neighbors(id) + .filter( + (item: any) => this.graph.node.get(item)?.type === EntityType.PUBKEY + ) .map((id: string) => Buffer.from(id, "hex")); state[id] = { connectedTo }; }