@cryptotaxi247 / kubo / commits / a10fb7aa4

core: set local listening addresses

Juan Batiz-Benet committed Dec 22, 2014 at 23:50 UTC a10fb7aa4b76a3e1d8d43e601fe67f397bdfb580
1 file changed +5
core/core.go
+5
@@ -127,6 +127,11 @@ func NewIpfsNode(ctx context.Context, cfg *config.Config, online bool) (n *IpfsN
127 }
128 n.AddChildGroup(n.Network.CtxGroup())
129
130 + // explicitly set these as our listen addrs.
131 + // (why not do it inside inet.NewNetwork? because this way we can
132 + // listen on addresses without necessarily advertising those publicly.)
133 + n.Peerstore.AddAddresses(n.Identity, n.Network.ListenAddresses())
134 +
135 // setup diagnostics service
136 n.Diagnostics = diag.NewDiagnostics(n.Identity, n.Network)
137