Skip to content

Commit 26b6e11

Browse files
authored
Merge branch 'main' into refactor/replace-magic-numbers-with-named-constants
2 parents 21dd467 + a01811a commit 26b6e11

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libp2p/pubsub/gossipsub.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,8 @@ def _get_peers_to_send(
308308
floodsub_peers: set[ID] = {
309309
peer_id
310310
for peer_id in self.pubsub.peer_topics[topic]
311-
if self.peer_protocol[peer_id] == floodsub.PROTOCOL_ID
311+
if peer_id in self.peer_protocol
312+
and self.peer_protocol[peer_id] == floodsub.PROTOCOL_ID
312313
}
313314
send_to.update(floodsub_peers)
314315

0 commit comments

Comments
 (0)