Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions mempool/src/quorum_waiter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,15 @@ impl QuorumWaiter {
while let Some(stake) = wait_for_quorum.next().await {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this line won't block until a message is received from other validators (which will never happen if there is a single validator)?

total_stake += stake;
if total_stake >= self.committee.quorum_threshold() {
self.tx_batch
.send(batch)
.await
.expect("Failed to deliver batch");
break;
}
}
if total_stake >= self.committee.quorum_threshold() {
self.tx_batch
.send(batch)
.await
.expect("Failed to deliver batch");
}

// Give a bit of extra time to disseminate the batch to slower nodes rather than
// immediately dropping the handles.
Expand Down