mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-23 19:37:46 +08:00
Merge pull request #6415 from sanderpick/sander/move-discovery
libp2p: moves discovery after host listen
This commit is contained in:
commit
505eeed3e9
@ -94,11 +94,11 @@ func LibP2P(bcfg *BuildCfg, cfg *config.Config) fx.Option {
|
||||
BaseLibP2P,
|
||||
|
||||
fx.Provide(libp2p.AddrFilters(cfg.Swarm.AddrFilters)),
|
||||
fx.Invoke(libp2p.SetupDiscovery(cfg.Discovery.MDNS.Enabled, cfg.Discovery.MDNS.Interval)),
|
||||
fx.Provide(libp2p.AddrsFactory(cfg.Addresses.Announce, cfg.Addresses.NoAnnounce)),
|
||||
fx.Provide(libp2p.SmuxTransport(bcfg.getOpt("mplex"))),
|
||||
fx.Provide(libp2p.Relay(cfg.Swarm.DisableRelay, cfg.Swarm.EnableRelayHop)),
|
||||
fx.Invoke(libp2p.StartListening(cfg.Addresses.Swarm)),
|
||||
fx.Invoke(libp2p.SetupDiscovery(cfg.Discovery.MDNS.Enabled, cfg.Discovery.MDNS.Interval)),
|
||||
|
||||
fx.Provide(libp2p.Security(!bcfg.DisableEncryptedConnections, cfg.Experimental.PreferTLS)),
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user