From a10fb7aa4b76a3e1d8d43e601fe67f397bdfb580 Mon Sep 17 00:00:00 2001 From: Juan Batiz-Benet Date: Mon, 22 Dec 2014 23:50:32 -0800 Subject: [PATCH] core: set local listening addresses --- core/core.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/core.go b/core/core.go index 03ff5c459..16b1f2745 100644 --- a/core/core.go +++ b/core/core.go @@ -127,6 +127,11 @@ func NewIpfsNode(ctx context.Context, cfg *config.Config, online bool) (n *IpfsN } n.AddChildGroup(n.Network.CtxGroup()) + // explicitly set these as our listen addrs. + // (why not do it inside inet.NewNetwork? because this way we can + // listen on addresses without necessarily advertising those publicly.) + n.Peerstore.AddAddresses(n.Identity, n.Network.ListenAddresses()) + // setup diagnostics service n.Diagnostics = diag.NewDiagnostics(n.Identity, n.Network)