This repository was archived by the owner on Apr 29, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 47
47
"libp2p" : " ^0.5.1" ,
48
48
"libp2p-mdns" : " ^0.6.0" ,
49
49
"libp2p-multiplex" : " ^0.3.5" ,
50
+ "libp2p-railing" : " ^0.4.0" ,
50
51
"libp2p-secio" : " ^0.6.5" ,
51
52
"libp2p-spdy" : " ^0.10.3" ,
52
53
"libp2p-swarm" : " ^0.26.13" ,
70
71
" greenkeeperio-bot <support@greenkeeper.io>" ,
71
72
" varunagarwal315 <varunagarwal315@gmail.com>"
72
73
]
73
- }
74
+ }
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ const TCP = require('libp2p-tcp')
5
5
const WebRTCStar = require ( 'libp2p-webrtc-star' )
6
6
const MulticastDNS = require ( 'libp2p-mdns' )
7
7
const WS = require ( 'libp2p-websockets' )
8
+ const Railing = require ( 'libp2p-railing' )
8
9
const spdy = require ( 'libp2p-spdy' )
9
10
const multiplex = require ( 'libp2p-multiplex' )
10
11
const secio = require ( 'libp2p-secio' )
@@ -42,7 +43,13 @@ class Node extends libp2p {
42
43
}
43
44
44
45
if ( options . mdns ) {
45
- modules . discovery . push ( new MulticastDNS ( peerInfo , 'ipfs.local' ) )
46
+ const mdns = new MulticastDNS ( peerInfo , 'ipfs.local' )
47
+ modules . discovery . push ( mdns )
48
+ }
49
+
50
+ if ( options . bootstrap && process . env . IPFS_BOOTSTRAP ) {
51
+ const r = new Railing ( options . bootstrap )
52
+ modules . discovery . push ( r )
46
53
}
47
54
48
55
super ( modules , peerInfo , peerBook , options )
You can’t perform that action at this time.
0 commit comments