mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-06-26 23:41:34 +00:00
doc
examples
img
src
test
addresses
connection-manager
content-routing
core
dialing
fixtures
identify
insecure
keychain
metrics
peer-discovery
peer-routing
peer-routing.node.js
utils.js
peer-store
pnet
pubsub
record
registrar
relay
transports
upgrading
utils
.aegir.js
.gitignore
.travis.yml
CHANGELOG.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
ISSUE_TEMPLATE.md
LICENSE
MIGRATION_TEMPLATE.md
OKR.md
README.md
RELEASE.md
package-list.json
package.json
* 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
|