From 67fced52ecc0d748142c905801d77980e84e18c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= Date: Mon, 11 Jun 2018 14:59:23 +0200 Subject: [PATCH] feat: Add rendezvous --- src/core/components/libp2p.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/components/libp2p.js b/src/core/components/libp2p.js index 8935fe3e4d..ab747679cd 100644 --- a/src/core/components/libp2p.js +++ b/src/core/components/libp2p.js @@ -4,6 +4,7 @@ const Node = require('../runtime/libp2p-nodejs') const promisify = require('promisify-es6') const get = require('lodash.get') +const Rendezvous = require('libp2p-rendezvous') module.exports = function libp2p (self) { return { @@ -33,6 +34,8 @@ module.exports = function libp2p (self) { } self._libp2pNode = new Node(self._peerInfo, self._peerInfoBook, options) + const rendezvous = self.rendezvous = new Rendezvous(self._libp2pNode) + self._libp2pNode.modules.discovery.push(rendezvous) self._libp2pNode.on('peer:discovery', (peerInfo) => { const dial = () => {