Fix the tests according to pubsub.Publish

And refactored a bit.
This commit is contained in:
mhchia
2019-07-25 16:58:00 +08:00
parent cae4f34034
commit dadcf8138e
3 changed files with 62 additions and 86 deletions

View File

@ -91,6 +91,7 @@ class GossipSub(IPubsubRouter):
:param rpc: rpc message
"""
control_message = rpc.control
sender_peer_id = str(sender_peer_id)
# Relay each rpc control to the appropriate handler
if control_message.ihave: