Skip to content

Commit 5f874da

Browse files
committed
Correct a race condition for publishing messages already on the network
1 parent b29c2f6 commit 5f874da

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

protocols/gossipsub/src/behaviour.rs

+3
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,9 @@ where
731731
self.duplicate_cache.insert(msg_id.clone());
732732
self.mcache.put(&msg_id, raw_message.clone());
733733

734+
// Consider the message as delivered for gossip promises.
735+
self.gossip_promises.message_delivered(&msg_id);
736+
734737
// If the message is anonymous or has a random author add it to the published message ids
735738
// cache.
736739
if let PublishConfig::RandomAuthor | PublishConfig::Anonymous = self.publish_config {

0 commit comments

Comments
 (0)