mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-10 23:20:55 +00:00
Apply PR feedback
This commit is contained in:
@ -533,6 +533,7 @@ class GossipSub(IPubsubRouter):
|
||||
from_id_str = sender_peer_id
|
||||
|
||||
# FIXME: Update type of message ID
|
||||
# FIXME: Find a better way to parse the msg ids
|
||||
msg_ids: List[Any] = [literal_eval(msg) for msg in iwant_msg.messageIDs]
|
||||
msgs_to_forward: List[rpc_pb2.Message] = []
|
||||
for msg_id_iwant in msg_ids:
|
||||
|
||||
@ -373,6 +373,6 @@ class Pubsub:
|
||||
self.seen_messages[msg_id] = 1
|
||||
|
||||
def _is_subscribed_to_msg(self, msg: rpc_pb2.Message) -> bool:
|
||||
if not bool(self.my_topics):
|
||||
if not self.my_topics:
|
||||
return False
|
||||
return all([topic in self.my_topics for topic in msg.topicIDs])
|
||||
|
||||
Reference in New Issue
Block a user