mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-03-17 08:00:51 +00:00
* feat: async routing * chore: put dht extra api commands under content routing * chore: add default option to createPeerInfo Co-Authored-By: Jacob Heun <jacobheun@gmail.com> * chore: address review * chore: rm dlv
25 lines
460 B
JavaScript
25 lines
460 B
JavaScript
'use strict'
|
|
|
|
const KadDht = require('libp2p-kad-dht')
|
|
const mergeOptions = require('merge-options')
|
|
const baseOptions = require('../utils/base-options')
|
|
|
|
module.exports.baseOptions = baseOptions
|
|
|
|
const routingOptions = mergeOptions(baseOptions, {
|
|
modules: {
|
|
dht: KadDht
|
|
},
|
|
config: {
|
|
dht: {
|
|
kBucketSize: 20,
|
|
randomWalk: {
|
|
enabled: true
|
|
},
|
|
enabled: true
|
|
}
|
|
}
|
|
})
|
|
|
|
module.exports.routingOptions = routingOptions
|