Skip to content

Commit

Permalink
Order votes check (aptos-labs#14278)
Browse files Browse the repository at this point in the history
  • Loading branch information
vusirikala authored Aug 14, 2024
1 parent 2c93c06 commit 03a8755
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions consensus/src/round_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1257,6 +1257,15 @@ impl RoundManager {
qc
))?;
if self.onchain_config.order_vote_enabled() {
// This check is already done in safety rules. As printing the "failed to broadcast order vote"
// in humio logs could sometimes look scary, we are doing the same check again here.
if let Some(last_sent_vote) = self.round_state.vote_sent() {
if let Some((two_chain_timeout, _)) = last_sent_vote.two_chain_timeout() {
if round <= two_chain_timeout.round() {
return Ok(());
}
}
}
// Broadcast order vote if the QC is successfully aggregated
// Even if broadcast order vote fails, the function will return Ok
if let Err(e) = self.broadcast_order_vote(vote, qc.clone()).await {
Expand Down

0 comments on commit 03a8755

Please sign in to comment.