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

Commit 3cf512f

Browse files
jacobheunAlan Shaw
authored andcommitted
chore: update libp2p version (#1990)
Also update configurations for libp2p-switch
1 parent 9708c0a commit 3cf512f

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
"joi": "^14.3.0",
128128
"just-flatten-it": "^2.1.0",
129129
"just-safe-set": "^2.1.0",
130-
"libp2p": "~0.25.0-rc.6",
130+
"libp2p": "~0.25.0",
131131
"libp2p-bootstrap": "~0.9.3",
132132
"libp2p-crypto": "~0.16.0",
133133
"libp2p-kad-dht": "~0.14.12",

src/core/runtime/libp2p-browser.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ class Node extends libp2p {
2222
const wsstar = new WebSocketStarMulti({ servers: wsstarServers, id: _options.peerInfo.id, ignore_no_online: !wsstarServers.length || _options.wsStarIgnoreErrors })
2323

2424
const defaults = {
25+
switch: {
26+
blacklistTTL: 2 * 60 * 1e3, // 2 minute base
27+
blackListAttempts: 5, // back off 5 times
28+
maxParallelDials: 100,
29+
maxColdCalls: 25,
30+
dialTimeout: 20e3
31+
},
2532
modules: {
2633
transport: [
2734
WS,

src/core/runtime/libp2p-nodejs.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ class Node extends libp2p {
2121
const wsstar = new WebSocketStarMulti({ servers: wsstarServers, id: _options.peerInfo.id, ignore_no_online: !wsstarServers.length || _options.wsStarIgnoreErrors })
2222

2323
const defaults = {
24+
switch: {
25+
blacklistTTL: 2 * 60 * 1e3, // 2 minute base
26+
blackListAttempts: 5, // back off 5 times
27+
maxParallelDials: 150,
28+
maxColdCalls: 50,
29+
dialTimeout: 10e3 // Be strict with dial time
30+
},
2431
modules: {
2532
transport: [
2633
TCP,

0 commit comments

Comments
 (0)