Skip to content

Commit

Permalink
set wan dht to server mode (#2085)
Browse files Browse the repository at this point in the history
* set wan dht to server mode

* remove file deletion in initializeConfiguration
  • Loading branch information
zeroxbt authored Sep 9, 2022
1 parent a81d60e commit 72d62b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
8 changes: 0 additions & 8 deletions ot-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
5 changes: 4 additions & 1 deletion src/modules/network/implementation/libp2p-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 72d62b8

Please sign in to comment.