mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-06-13 17:21:21 +00:00
feat: prepare for new randomWalk config parameters
As per: https://github.com/libp2p/js-libp2p-kad-dht/issues/76 fix: pass whole dht config into DHT constructor
This commit is contained in:
committed by
Jacob Heun
parent
679d446daa
commit
91e60d4253
@ -105,14 +105,10 @@ class Node extends EventEmitter {
|
||||
// dht provided components (peerRouting, contentRouting, dht)
|
||||
if (this._config.dht.enabled) {
|
||||
const DHT = this._modules.dht
|
||||
const enabledDiscovery = this._config.dht.enabledDiscovery !== false
|
||||
|
||||
this._dht = new DHT(this._switch, {
|
||||
kBucketSize: this._config.dht.kBucketSize,
|
||||
enabledDiscovery,
|
||||
datastore: this.datastore,
|
||||
validators: this._config.dht.validators,
|
||||
selectors: this._config.dht.selectors
|
||||
...this._config.dht
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user