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 }; }