diff --git a/core/core.go b/core/core.go index 561c53ae4..6ddb593e9 100644 --- a/core/core.go +++ b/core/core.go @@ -21,6 +21,7 @@ import ( ic "github.com/jbenet/go-ipfs/p2p/crypto" p2phost "github.com/jbenet/go-ipfs/p2p/host" p2pbhost "github.com/jbenet/go-ipfs/p2p/host/basic" + rhost "github.com/jbenet/go-ipfs/p2p/host/routed" swarm "github.com/jbenet/go-ipfs/p2p/net/swarm" addrutil "github.com/jbenet/go-ipfs/p2p/net/swarm/addr" peer "github.com/jbenet/go-ipfs/p2p/peer" @@ -236,6 +237,8 @@ func (n *IpfsNode) startOnlineServices(ctx context.Context, routingOption Routin return err } + n.PeerHost = rhost.Wrap(peerhost, n.Routing) + // Ok, now we're ready to listen. if err := startListening(ctx, n.PeerHost, n.Repo.Config()); err != nil { return debugerror.Wrap(err)