From f98d2b635dc95ac00dcc986b748eb738a4cca00b Mon Sep 17 00:00:00 2001 From: Giovanni Petrantoni Date: Sun, 28 Jun 2020 11:03:33 +0900 Subject: [PATCH] internal test fixes --- tests/pubsub/testgossipinternal.nim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/pubsub/testgossipinternal.nim b/tests/pubsub/testgossipinternal.nim index 3d03f013b..7260b4af4 100644 --- a/tests/pubsub/testgossipinternal.nim +++ b/tests/pubsub/testgossipinternal.nim @@ -56,6 +56,7 @@ suite "GossipSub internal": let topic = "foobar" gossipSub.gossipsub[topic] = initHashSet[string]() + gossipSub.topics[topic] = Topic() # has to be in topics to rebalance var conns = newSeq[Connection]() for i in 0..<15: @@ -97,6 +98,7 @@ suite "GossipSub internal": conn.peerInfo = peerInfo gossipSub.peers[peerInfo.id] = newPubSubPeer(peerInfo, GossipSubCodec) gossipSub.peers[peerInfo.id].handler = handler + gossipSub.peers[peerInfo.id].topics &= topic gossipSub.gossipsub[topic].incl(peerInfo.id) check gossipSub.gossipsub[topic].len == 15