File tree 2 files changed +19
-12
lines changed
2 files changed +19
-12
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,8 @@ const libp2pBundle = (opts) => {
44
44
peerBook,
45
45
// Lets limit the connection managers peers and have it check peer health less frequently
46
46
connectionManager : {
47
- maxPeers : 25 ,
47
+ minPeers : 25 ,
48
+ maxPeers : 100 ,
48
49
pollInterval : 5000
49
50
} ,
50
51
modules : {
@@ -68,12 +69,13 @@ const libp2pBundle = (opts) => {
68
69
} ,
69
70
config : {
70
71
peerDiscovery : {
72
+ autoDial : true , // auto dial to peers we find when we have less peers than `connectionManager.minPeers`
71
73
mdns : {
72
74
interval : 10000 ,
73
75
enabled : true
74
76
} ,
75
77
bootstrap : {
76
- interval : 10000 ,
78
+ interval : 30e3 ,
77
79
enabled : true ,
78
80
list : bootstrapList
79
81
}
@@ -87,10 +89,15 @@ const libp2pBundle = (opts) => {
87
89
}
88
90
} ,
89
91
dht : {
90
- kBucketSize : 20
92
+ enabled : true ,
93
+ kBucketSize : 20 ,
94
+ randomWalk : {
95
+ enabled : true ,
96
+ interval : 10e3 , // This is set low intentionally, so more peers are discovered quickly. Higher intervals are recommended
97
+ timeout : 2e3 // End the query quickly since we're running so frequently
98
+ }
91
99
} ,
92
100
EXPERIMENTAL : {
93
- dht : true ,
94
101
pubsub : true
95
102
}
96
103
}
Original file line number Diff line number Diff line change 10
10
"license" : " MIT" ,
11
11
"dependencies" : {
12
12
"ipfs" : " file:../../" ,
13
- "libp2p" : " ~0.24 .0" ,
14
- "libp2p-bootstrap" : " ~0.9.3 " ,
15
- "libp2p-kad-dht" : " ~0.11.1 " ,
16
- "libp2p-mdns" : " ~0.12.0 " ,
17
- "libp2p-mplex" : " ~0.8.4 " ,
18
- "libp2p-secio" : " ~0.10 .1" ,
19
- "libp2p-spdy" : " ~0.13.0 " ,
13
+ "libp2p" : " ~0.25 .0" ,
14
+ "libp2p-bootstrap" : " ~0.9.7 " ,
15
+ "libp2p-kad-dht" : " ~0.14.12 " ,
16
+ "libp2p-mdns" : " ~0.12.2 " ,
17
+ "libp2p-mplex" : " ~0.8.5 " ,
18
+ "libp2p-secio" : " ~0.11 .1" ,
19
+ "libp2p-spdy" : " ~0.13.3 " ,
20
20
"libp2p-tcp" : " ~0.13.0" ,
21
- "libp2p-websocket-star" : " ~0.9.0 "
21
+ "libp2p-websocket-star" : " ~0.10.2 "
22
22
}
23
23
}
You can’t perform that action at this time.
0 commit comments