From a4aecd14db3fef60835e197a93f7489a8d69c9c0 Mon Sep 17 00:00:00 2001 From: zeroxbt Date: Fri, 14 Jul 2023 12:08:18 +0200 Subject: [PATCH] Revert "add announce address (#2648)" This reverts commit a90070e1c1423d9156d0abe6b41b24f1da7b8565. --- .../network/implementation/libp2p-service.js | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/modules/network/implementation/libp2p-service.js b/src/modules/network/implementation/libp2p-service.js index b41904c5dd..4725038dce 100644 --- a/src/modules/network/implementation/libp2p-service.js +++ b/src/modules/network/implementation/libp2p-service.js @@ -75,14 +75,10 @@ class Libp2pService { * } */ this.sessions = {}; - const addresses = { - listen: [`/ip4/0.0.0.0/tcp/${this.config.port}`], - }; - if (ip.isV4Format(this.config.publicIp) && ip.isPublic(this.config.publicIp)) { - addresses.announce = [`/ip4/${this.config.publicIp}/tcp/${this.config.port}`]; - } this.node = await createLibp2p({ - addresses, + addresses: { + listen: [`/ip4/0.0.0.0/tcp/${this.config.port}`], + }, transports: [tcp()], streamMuxers: [mplex()], connectionEncryption: [noise()], @@ -175,10 +171,6 @@ class Libp2pService { this.blackList = {}; } - getConnections(peerIdObject) { - return this.node.getConnections(peerIdObject); - } - getMultiaddrs() { return this.node.getMultiaddrs(); }