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 4747 "libp2p" : " ^0.5.1" ,
4848 "libp2p-mdns" : " ^0.6.0" ,
4949 "libp2p-multiplex" : " ^0.3.5" ,
50+ "libp2p-railing" : " ^0.4.0" ,
5051 "libp2p-secio" : " ^0.6.5" ,
5152 "libp2p-spdy" : " ^0.10.3" ,
5253 "libp2p-swarm" : " ^0.26.13" ,
7071 " greenkeeperio-bot <support@greenkeeper.io>" ,
7172 " varunagarwal315 <varunagarwal315@gmail.com>"
7273 ]
73- }
74+ }
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ const TCP = require('libp2p-tcp')
55const WebRTCStar = require ( 'libp2p-webrtc-star' )
66const MulticastDNS = require ( 'libp2p-mdns' )
77const WS = require ( 'libp2p-websockets' )
8+ const Railing = require ( 'libp2p-railing' )
89const spdy = require ( 'libp2p-spdy' )
910const multiplex = require ( 'libp2p-multiplex' )
1011const secio = require ( 'libp2p-secio' )
@@ -42,7 +43,13 @@ class Node extends libp2p {
4243 }
4344
4445 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 )
4653 }
4754
4855 super ( modules , peerInfo , peerBook , options )
You can’t perform that action at this time.
0 commit comments