diff --git a/libp2p/pubsub/pubsub.py b/libp2p/pubsub/pubsub.py index bfad873..bee5fba 100644 --- a/libp2p/pubsub/pubsub.py +++ b/libp2p/pubsub/pubsub.py @@ -1,5 +1,4 @@ import asyncio -import uuid from .pb import rpc_pb2 from .pubsub_notifee import PubsubNotifee @@ -202,10 +201,6 @@ class Pubsub(): # Create subscribe message packet = rpc_pb2.RPC() - # packet.publish.extend([rpc_pb2.Message( - # from_id=str(self.host.get_id()).encode('utf-8'), - # seqno=str(generate_message_id()).encode('utf-8') - # )]) packet.subscriptions.extend([rpc_pb2.RPC.SubOpts( subscribe=True, topicid=topic_id.encode('utf-8') @@ -255,10 +250,3 @@ class Pubsub(): # Write message to stream await stream.write(rpc_msg) - -def generate_message_id(): - """ - Generate a unique message id - :return: messgae id - """ - return str(uuid.uuid1()) diff --git a/tests/pubsub/test_floodsub.py b/tests/pubsub/test_floodsub.py index 4fc059b..272af79 100644 --- a/tests/pubsub/test_floodsub.py +++ b/tests/pubsub/test_floodsub.py @@ -54,8 +54,6 @@ async def test_simple_two_nodes_RPC(): # as the message sent by node_a assert res_b.SerializeToString() == msg.publish[0].SerializeToString() - - # Success, terminate pending tasks. await cleanup()