From b33aca02795a3a09a51389e25a23702690f4dce9 Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Fri, 15 Nov 2019 15:35:43 +0100 Subject: [PATCH] chore: address review --- package.json | 2 +- src/registrar.js | 4 +--- test/pubsub/operation.node.js | 5 ++++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 6a1d81a609..1ebd91a925 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ "libp2p-delegated-content-routing": "^0.2.2", "libp2p-delegated-peer-routing": "^0.2.2", "libp2p-floodsub": "^0.19.0", - "libp2p-gossipsub": "ChainSafe/gossipsub-js#refactor/async", + "libp2p-gossipsub": "ChainSafe/gossipsub-js#beta/async", "libp2p-kad-dht": "^0.15.3", "libp2p-mdns": "^0.12.3", "libp2p-mplex": "^0.9.1", diff --git a/src/registrar.js b/src/registrar.js index d777458ecf..c4a116806b 100644 --- a/src/registrar.js +++ b/src/registrar.js @@ -6,7 +6,6 @@ const log = debug('libp2p:peer-store') log.error = debug('libp2p:peer-store:error') const Topology = require('libp2p-interfaces/src/topology') -const MulticodecTopology = require('libp2p-interfaces/src/topology/multicodec-topology') const { Connection } = require('libp2p-interfaces/src/connection') const PeerInfo = require('peer-info') @@ -112,8 +111,7 @@ class Registrar { */ register (topology) { assert( - Topology.isTopology(topology) || - MulticodecTopology.isMulticodecTopology(topology), + Topology.isTopology(topology), 'topology must be an instance of interfaces/topology') // Create topology diff --git a/test/pubsub/operation.node.js b/test/pubsub/operation.node.js index bec41a3025..8685818fee 100644 --- a/test/pubsub/operation.node.js +++ b/test/pubsub/operation.node.js @@ -140,7 +140,10 @@ describe('Pubsub subsystem operates correctly', () => { remoteLibp2p.pubsub.start() - await pWaitFor(() => libp2p.pubsub._pubsub.peers.size === 1) + await pWaitFor(() => + libp2p.pubsub._pubsub.peers.size === 1 && + remoteLibp2p.pubsub._pubsub.peers.size === 1 + ) expect(libp2p.pubsub._pubsub.peers.size).to.be.eql(1) expect(remoteLibp2p.pubsub._pubsub.peers.size).to.be.eql(1)