I actually didnt fix the issue with array of arrays. Now it should be fine

This commit is contained in:
MrMasrozYTLIVE
2024-06-10 18:03:15 +03:00
parent ecfc62ff2c
commit d993090f8b
2 changed files with 3 additions and 2 deletions

View File

@ -22,7 +22,7 @@ class Client extends EventEmitter {
this.swarm.on('update', () => {
console.log(`Peers count: ${this.swarm.connections.size}`);
if(this.swarm.connections.size > 0) {
let peers = [...this.swarm.peers].filter(peer => peer && peer.publicKey && peer.publicKey.toString('hex').startsWith("51be150"))
let peers = [...this.swarm.peers].filter(peer => peer && peer.publicKey && peer.publicKey.toString('hex').startsWith("a4eb7f"))
if(peers.length > 0) {
console.log(peers[0])
console.log([peers[0].topics]);