Skip to content

Commit 74134e9

Browse files
committed
Remove piggyback TODO from gossipsub
Signed-off-by: sukhman <[email protected]>
1 parent 5a3adad commit 74134e9

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
@@ -251,7 +251,6 @@ async def publish(self, msg_forwarder: ID, pubsub_msg: rpc_pb2.Message) -> None:
251251
stream = self.pubsub.peers[peer_id]
252252
# FIXME: We should add a `WriteMsg` similar to write delimited messages.
253253
# Ref: https://github.com/libp2p/go-libp2p-pubsub/blob/master/comm.go#L107
254-
# TODO: Go use `sendRPC`, which possibly piggybacks gossip/control messages.
255254
try:
256255
await stream.write(encode_varint_prefixed(rpc_msg.SerializeToString()))
257256
except StreamClosed:
@@ -459,8 +458,8 @@ async def heartbeat(self) -> None:
459458
self.fanout_heartbeat()
460459
# Get the peers to send IHAVE to
461460
peers_to_gossip = self.gossip_heartbeat()
462-
# Pack GRAFT, PRUNE and IHAVE for the same peer into one control message and
463-
# send it
461+
# Pack(piggyback) GRAFT, PRUNE and IHAVE for the same peer into
462+
# one control message and send it
464463
await self._emit_control_msgs(
465464
peers_to_graft, peers_to_prune, peers_to_gossip
466465
)

0 commit comments

Comments
 (0)