Skip to content

Commit a01811a

Browse files
authored
Merge pull request #893 from paschal533/keyerror-fix
fix: GossipSub peer propagation to include FloodSub peers
2 parents 8d028a0 + db2f3a6 commit a01811a

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)