Skip to content

Commit

Permalink
docs(gossip): add comment about message uniqueness (#2140)
Browse files Browse the repository at this point in the history
This would have spared me some debugging if I knew beforehand.

---------

Co-authored-by: Friedel Ziegelmayer <[email protected]>
  • Loading branch information
Septias and dignifiedquire authored Apr 4, 2024
1 parent aa1cf66 commit 9fc1266
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions iroh-gossip/src/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ impl Gossip {
///
/// This does not join the topic automatically, so you have to call [`Self::join`] yourself
/// for messages to be broadcast to peers.
///
/// Messages with the same content are only delivered once.
pub async fn broadcast(&self, topic: TopicId, message: Bytes) -> anyhow::Result<()> {
let (tx, rx) = oneshot::channel();
self.send(ToActor::Broadcast(topic, message, Scope::Swarm, tx))
Expand Down

0 comments on commit 9fc1266

Please sign in to comment.