Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit a473cae

Browse files
committed
chore: adding more logs
Signed-off-by: Simon Paitrault <[email protected]>
1 parent b1a3714 commit a473cae

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

crates/topos-p2p/src/behaviour/gossip.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,15 @@ impl Behaviour {
3434
) -> Result<MessageId, P2PError> {
3535
match topic {
3636
TOPOS_GOSSIP | TOPOS_ECHO | TOPOS_READY => {
37-
let msg_id = self.gossipsub.publish(IdentTopic::new(topic), message)?;
37+
let topic = IdentTopic::new(topic);
38+
let topic_hash = topic.hash();
39+
let msg_id = self.gossipsub.publish(topic, message)?;
3840
trace!("Published on topos_gossip: {:?}", msg_id);
3941

42+
for p in self.gossipsub.mesh_peers(&topic_hash) {
43+
debug!("Sent gossipsub message({}) to {} peer", msg_id, p);
44+
}
45+
4046
Ok(msg_id)
4147
}
4248
_ => Err(P2PError::InvalidGossipTopic(topic)),

0 commit comments

Comments
 (0)