@cryptotaxi247 / kubo / commits / d1f9efb3f

Merge pull request #6415 from sanderpick/sander/move-discovery

libp2p: moves discovery after host listen

Steven Allen committed Jun 5, 2019 at 21:36 UTC d1f9efb3fc92cefd7b6d5dc147af11dc17a8a910
1 file changed +1 -1
core/node/groups.go
+1 -1
@@ -96,11 +96,11 @@ func LibP2P(bcfg *BuildCfg, cfg *config.Config) fx.Option {
96 BaseLibP2P,
97
98 fx.Provide(libp2p.AddrFilters(cfg.Swarm.AddrFilters)),
99 - fx.Invoke(libp2p.SetupDiscovery(cfg.Discovery.MDNS.Enabled, cfg.Discovery.MDNS.Interval)),
99 fx.Provide(libp2p.AddrsFactory(cfg.Addresses.Announce, cfg.Addresses.NoAnnounce)),
100 fx.Provide(libp2p.SmuxTransport(bcfg.getOpt("mplex"))),
101 fx.Provide(libp2p.Relay(cfg.Swarm.DisableRelay, cfg.Swarm.EnableRelayHop)),
102 fx.Invoke(libp2p.StartListening(cfg.Addresses.Swarm)),
103 + fx.Invoke(libp2p.SetupDiscovery(cfg.Discovery.MDNS.Enabled, cfg.Discovery.MDNS.Interval)),
104
105 fx.Provide(libp2p.Security(!bcfg.DisableEncryptedConnections, cfg.Experimental.PreferTLS)),
106