From 72d62b851456c1e915f00a5576d033b068993066 Mon Sep 17 00:00:00 2001 From: zeroxbt <89495162+zeroxbt@users.noreply.github.com> Date: Fri, 9 Sep 2022 13:25:54 +0200 Subject: [PATCH] set wan dht to server mode (#2085) * set wan dht to server mode * remove file deletion in initializeConfiguration --- ot-node.js | 8 -------- src/modules/network/implementation/libp2p-service.js | 5 ++++- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/ot-node.js b/ot-node.js index cb8283521..309fc6026 100644 --- a/ot-node.js +++ b/ot-node.js @@ -74,14 +74,6 @@ class OTNode { // set default user configuration filename this.config.configFilename = '.origintrail_noderc'; } - const fileService = new FileService({ config: this.config }); - const updateFilePath = fileService.getUpdateFilePath(); - if (fs.existsSync(updateFilePath)) { - this.config.otNodeUpdated = true; - fileService.removeFile(updateFilePath).catch((error) => { - this.logger.warn(`Unable to remove update file. Error: ${error}`); - }); - } } async initializeDependencyContainer() { diff --git a/src/modules/network/implementation/libp2p-service.js b/src/modules/network/implementation/libp2p-service.js index ac3a48342..8ef0119b5 100644 --- a/src/modules/network/implementation/libp2p-service.js +++ b/src/modules/network/implementation/libp2p-service.js @@ -39,7 +39,10 @@ class Libp2pService { this.config = config; this.logger = logger; - initializationObject.dht = new KadDHT({ kBucketSize: this.config.kBucketSize }); + initializationObject.dht = new KadDHT({ + kBucketSize: this.config.kBucketSize, + clientMode: false, + }); initializationObject.peerRouting = this.config.peerRouting; initializationObject.connectionManager = this.config.connectionManager;