diff --git a/chatBot/includes/client.js b/chatBot/includes/client.js index 09964f5..5d68b3f 100644 --- a/chatBot/includes/client.js +++ b/chatBot/includes/client.js @@ -20,7 +20,11 @@ class Client extends EventEmitter { }); this.swarm.on('update', () => { - console.log(`Peers count: ${this.swarm.connections.size}`); + console.log(`Peers count: ${this.swarm.connections.size} (${this.swarm.peers.size})`); + + this.swarm.peers.forEach((peer, peerInfo) => { + console.log(`Peer ${peer} is in topic(s) ${[...peerInfo.topics].map(topic => topic.toString('hex'))}`); + }); }); }