fix_gossipsub_mid_type (#859)

* fix_gossipsub_mid_type

* Fix lint and add newsfragments

* Fix mid formation

* Revert "Fix mid formation"

This reverts commit 835d4ca7af58f0716db51a00a8a7aa6cc15ac0a6.
This commit is contained in:
Sukhman Singh
2025-08-24 23:41:36 +05:30
committed by GitHub
parent 94d695c6bc
commit bc1b1ed6ae
2 changed files with 5 additions and 4 deletions

View File

@ -775,16 +775,16 @@ class GossipSub(IPubsubRouter, Service):
# Get list of all seen (seqnos, from) from the (seqno, from) tuples in
# seen_messages cache
seen_seqnos_and_peers = [
seqno_and_from for seqno_and_from in self.pubsub.seen_messages.cache.keys()
str(seqno_and_from)
for seqno_and_from in self.pubsub.seen_messages.cache.keys()
]
# Add all unknown message ids (ids that appear in ihave_msg but not in
# seen_seqnos) to list of messages we want to request
# FIXME: Update type of message ID
msg_ids_wanted: list[Any] = [
msg_ids_wanted: list[str] = [
msg_id
for msg_id in ihave_msg.messageIDs
if literal_eval(msg_id) not in seen_seqnos_and_peers
if msg_id not in seen_seqnos_and_peers
]
# Request messages with IWANT message

View File

@ -0,0 +1 @@
Fix type for gossipsub_message_id for consistency and security