Refactor floodsub.publish

Passed the first test of floodsub
This commit is contained in:
mhchia
2019-07-25 14:08:16 +08:00
parent 93cf5a2c32
commit cae4f34034
5 changed files with 87 additions and 72 deletions

View File

@ -42,11 +42,11 @@ class IPubsubRouter(ABC):
"""
@abstractmethod
def publish(self, sender_peer_id, rpc_message):
async def publish(self, src, pubsub_msg) -> None:
"""
Invoked to forward a new message that has been validated
:param sender_peer_id: peer_id of message sender
:param rpc_message: message to forward
:param src: peer_id of message sender
:param pubsub_msg: pubsub message to forward
"""
@abstractmethod