feat: allow configurable validators and selectors to the dht (#288)

* feat: allow configurable validators and selectors to the dht

* chore: remove fallback
This commit is contained in:
Vasco Santos
2018-11-29 14:10:23 +00:00
committed by Jacob Heun
parent 581a1de472
commit 7d12eb9e26
4 changed files with 61 additions and 7 deletions

View File

@ -102,9 +102,11 @@ class Node extends EventEmitter {
const enabledDiscovery = this._config.dht.enabledDiscovery !== false
this._dht = new DHT(this._switch, {
kBucketSize: this._config.dht.kBucketSize || 20,
kBucketSize: this._config.dht.kBucketSize,
enabledDiscovery,
datastore: this.datastore
datastore: this.datastore,
validators: this._config.dht.validators,
selectors: this._config.dht.selectors
})
}