Commit f4f3f0f 1 parent 7c2c852 commit f4f3f0f Copy full SHA for f4f3f0f
File tree 5 files changed +14
-13
lines changed
5 files changed +14
-13
lines changed Original file line number Diff line number Diff line change 19
19
"detect-dom-ready" : " ^1.0.2" ,
20
20
"libp2p" : " ../../../" ,
21
21
"libp2p-bootstrap" : " ~0.9.7" ,
22
+ "libp2p-gossipsub" : " ~0.0.4" ,
22
23
"libp2p-kad-dht" : " ^0.15.3" ,
23
24
"libp2p-mplex" : " ~0.8.5" ,
24
25
"libp2p-secio" : " ~0.11.1" ,
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ const SPDY = require('libp2p-spdy')
8
8
const SECIO = require ( 'libp2p-secio' )
9
9
const Bootstrap = require ( 'libp2p-bootstrap' )
10
10
const DHT = require ( 'libp2p-kad-dht' )
11
+ const Gossipsub = require ( 'libp2p-gossipsub' )
11
12
const libp2p = require ( 'libp2p' )
12
13
13
14
// Find this list at: https://github.com/ipfs/js-ipfs/blob/master/src/core/runtime/config-browser.json
@@ -48,7 +49,8 @@ class Node extends libp2p {
48
49
wsstar . discovery ,
49
50
Bootstrap
50
51
] ,
51
- dht : DHT
52
+ dht : DHT ,
53
+ pubsub : Gossipsub
52
54
} ,
53
55
config : {
54
56
peerDiscovery : {
@@ -75,8 +77,8 @@ class Node extends libp2p {
75
77
dht : {
76
78
enabled : false
77
79
} ,
78
- EXPERIMENTAL : {
79
- pubsub : false
80
+ pubsub : {
81
+ enabled : false
80
82
}
81
83
} ,
82
84
connectionManager : {
Original file line number Diff line number Diff line change @@ -7,10 +7,10 @@ const Mplex = require('libp2p-mplex')
7
7
const SECIO = require ( 'libp2p-secio' )
8
8
const PeerInfo = require ( 'peer-info' )
9
9
const MulticastDNS = require ( 'libp2p-mdns' )
10
+ const Gossipsub = require ( 'libp2p-gossipsub' )
10
11
const defaultsDeep = require ( '@nodeutils/defaults-deep' )
11
12
const waterfall = require ( 'async/waterfall' )
12
13
const parallel = require ( 'async/parallel' )
13
- const series = require ( 'async/series' )
14
14
15
15
class MyBundle extends libp2p {
16
16
constructor ( _options ) {
@@ -19,17 +19,15 @@ class MyBundle extends libp2p {
19
19
transport : [ TCP ] ,
20
20
streamMuxer : [ Mplex ] ,
21
21
connEncryption : [ SECIO ] ,
22
- peerDiscovery : [ MulticastDNS ]
22
+ peerDiscovery : [ MulticastDNS ] ,
23
+ pubsub : Gossipsub
23
24
} ,
24
25
config : {
25
26
peerDiscovery : {
26
27
mdns : {
27
28
interval : 2000 ,
28
29
enabled : true
29
30
}
30
- } ,
31
- EXPERIMENTAL : {
32
- pubsub : true
33
31
}
34
32
}
35
33
}
Original file line number Diff line number Diff line change @@ -62,8 +62,8 @@ const configSchema = s({
62
62
} ) ,
63
63
// Pubsub config
64
64
pubsub : s ( 'object?' , {
65
- // DHT defaults
66
- enabled : false
65
+ // Pubsub defaults
66
+ enabled : true
67
67
} )
68
68
} , { } )
69
69
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ describe('configuration', () => {
83
83
autoDial : true
84
84
} ,
85
85
pubsub : {
86
- enabled : false
86
+ enabled : true
87
87
} ,
88
88
dht : {
89
89
kBucketSize : 20 ,
@@ -145,7 +145,7 @@ describe('configuration', () => {
145
145
}
146
146
} ,
147
147
pubsub : {
148
- enabled : false
148
+ enabled : true
149
149
} ,
150
150
dht : {
151
151
kBucketSize : 20 ,
@@ -270,7 +270,7 @@ describe('configuration', () => {
270
270
} ,
271
271
config : {
272
272
pubsub : {
273
- enabled : false
273
+ enabled : true
274
274
} ,
275
275
peerDiscovery : {
276
276
autoDial : true
You can’t perform that action at this time.
0 commit comments