Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 2874fc8

Browse files
committed
feat: expose libp2p connection manager configuration options
License: MIT Signed-off-by: Alan Shaw <[email protected]>
1 parent 45b705d commit 2874fc8

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/core/components/libp2p.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@ module.exports = function libp2p (self) {
3232
active: get(self._options, 'EXPERIMENTAL.relay.hop.active',
3333
get(config, 'EXPERIMENTAL.relay.hop.active', false))
3434
}
35-
}
35+
},
36+
connectionManager: get(
37+
self._options,
38+
'EXPERIMENTAL.connectionManager',
39+
get(config, 'EXPERIMENTAL.connectionManager')
40+
)
3641
}
3742

3843
self._libp2pNode = new Node(self._peerInfo, self._peerInfoBook, options)

src/core/config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ const schema = Joi.object().keys({
1616
EXPERIMENTAL: Joi.object().keys({
1717
pubsub: Joi.boolean(),
1818
sharding: Joi.boolean(),
19-
dht: Joi.boolean()
19+
dht: Joi.boolean(),
20+
connectionManager: Joi.object().allow(null)
2021
}).allow(null),
2122
config: Joi.object().keys({
2223
Addresses: Joi.object().keys({

0 commit comments

Comments
 (0)