*filter for peers in neighbors in _getBootstrapInfo

This commit is contained in:
Derrick Hammer 2022-11-24 01:48:00 -05:00
parent 48ceded78f
commit 587739334a
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 0 deletions

View File

@ -362,6 +362,9 @@ export default class DHTCache extends EventEmitter {
} }
const connectedTo = this.graph const connectedTo = this.graph
.neighbors(id) .neighbors(id)
.filter(
(item: any) => this.graph.node.get(item)?.type === EntityType.PUBKEY
)
.map((id: string) => Buffer.from(id, "hex")); .map((id: string) => Buffer.from(id, "hex"));
state[id] = { connectedTo }; state[id] = { connectedTo };
} }