diff --git a/package.json b/package.json index db3b3684..5e72dd88 100644 --- a/package.json +++ b/package.json @@ -36,41 +36,39 @@ "url": "https://github.com/libp2p/js-libp2p/issues" }, "homepage": "https://github.com/libp2p/js-libp2p", + "dependencies": { + "async": "^2.5.0", + "libp2p-ping": "~0.4.0", + "libp2p-swarm": "~0.30.0", + "mafmt": "^2.1.8", + "multiaddr": "^2.3.0", + "peer-book": "~0.4.0", + "peer-id": "~0.8.7", + "peer-info": "~0.9.3" + }, "devDependencies": { "aegir": "^11.0.2", - "chai": "^4.0.2", - "cids": "^0.5.0", - "dirty-chai": "^2.0.0", - "electron-webrtc": "^0.3.0", - "libp2p-kad-dht": "^0.2.0", - "libp2p-mdns": "^0.7.0", - "libp2p-multiplex": "^0.4.4", - "libp2p-railing": "^0.5.2", - "libp2p-secio": "^0.6.8", - "libp2p-spdy": "^0.10.6", - "libp2p-swarm": "^0.29.2", - "libp2p-tcp": "^0.10.1", - "libp2p-webrtc-star": "^0.11.0", - "libp2p-websockets": "^0.10.0", + "chai": "^4.1.0", + "dirty-chai": "^2.0.1", + "cids": "~0.5.1", + "libp2p-kad-dht": "~0.3.0", + "libp2p-mdns": "~0.7.1", + "libp2p-multiplex": "~0.4.4", + "libp2p-railing": "~0.5.2", + "libp2p-secio": "~0.6.8", + "libp2p-spdy": "~0.10.6", + "libp2p-tcp": "~0.10.1", + "libp2p-webrtc-star": "~0.11.0", + "libp2p-websockets": "~0.10.0", "lodash.times": "^4.3.2", - "mafmt": "^2.1.8", "pre-commit": "^1.2.2", "pull-goodbye": "0.0.2", "pull-serializer": "^0.3.2", "pull-stream": "^3.6.0", "safe-buffer": "^5.1.1", + "electron-webrtc": "^0.3.0", "wrtc": "0.0.62" }, - "dependencies": { - "async": "^2.5.0", - "libp2p-ping": "~0.4.0", - "libp2p-swarm": "~0.29.1", - "mafmt": "^2.1.8", - "multiaddr": "^2.3.0", - "peer-book": "~0.4.0", - "peer-id": "~0.8.7", - "peer-info": "~0.9.2" - }, "contributors": [ "David Dias ", "Friedel Ziegelmayer ", @@ -79,4 +77,4 @@ "greenkeeperio-bot ", "mayerwin " ] -} \ No newline at end of file +} diff --git a/src/index.js b/src/index.js index 8a25710d..d19447ff 100644 --- a/src/index.js +++ b/src/index.js @@ -77,7 +77,10 @@ class Node extends EventEmitter { // dht provided components (peerRouting, contentRouting, dht) if (_modules.DHT) { - this._dht = new this.modules.DHT(this, 20, _options.DHT && _options.DHT.datastore) + this._dht = new this.modules.DHT(this.swarm, { + kBucketSize: 20, + datastoer: _options.DHT && _options.DHT.datastore + }) } this.peerRouting = {