Skip to content

Commit 644fc77

Browse files
authored
Merge branch 'main' into limit_concurrency
2 parents 983a4a0 + 6a92fa2 commit 644fc77

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

libp2p/pubsub/gossipsub.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,6 @@ async def publish(self, msg_forwarder: ID, pubsub_msg: rpc_pb2.Message) -> None:
269269
stream = self.pubsub.peers[peer_id]
270270
# FIXME: We should add a `WriteMsg` similar to write delimited messages.
271271
# Ref: https://github.com/libp2p/go-libp2p-pubsub/blob/master/comm.go#L107
272-
# TODO: Go use `sendRPC`, which possibly piggybacks gossip/control messages.
273272
try:
274273
await stream.write(encode_varint_prefixed(rpc_msg.SerializeToString()))
275274
except StreamClosed:
@@ -485,8 +484,8 @@ async def heartbeat(self) -> None:
485484
self.fanout_heartbeat()
486485
# Get the peers to send IHAVE to
487486
peers_to_gossip = self.gossip_heartbeat()
488-
# Pack GRAFT, PRUNE and IHAVE for the same peer into one control message and
489-
# send it
487+
# Pack(piggyback) GRAFT, PRUNE and IHAVE for the same peer into
488+
# one control message and send it
490489
await self._emit_control_msgs(
491490
peers_to_graft, peers_to_prune, peers_to_gossip
492491
)

0 commit comments

Comments
 (0)