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

Commit

Permalink
chore: adding more logs
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Paitrault <simon.paitrault@gmail.com>
  • Loading branch information
Freyskeyd committed Apr 1, 2024
1 parent b1a3714 commit a473cae
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion crates/topos-p2p/src/behaviour/gossip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,15 @@ impl Behaviour {
) -> Result<MessageId, P2PError> {
match topic {
TOPOS_GOSSIP | TOPOS_ECHO | TOPOS_READY => {
let msg_id = self.gossipsub.publish(IdentTopic::new(topic), message)?;
let topic = IdentTopic::new(topic);
let topic_hash = topic.hash();
let msg_id = self.gossipsub.publish(topic, message)?;
trace!("Published on topos_gossip: {:?}", msg_id);

for p in self.gossipsub.mesh_peers(&topic_hash) {
debug!("Sent gossipsub message({}) to {} peer", msg_id, p);
}

Ok(msg_id)
}
_ => Err(P2PError::InvalidGossipTopic(topic)),
Expand Down

0 comments on commit a473cae

Please sign in to comment.