Skip to content

Commit

Permalink
[consensus] always wait for block qc to fetch batches (#15786)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibalajiarun authored Jan 22, 2025
1 parent 4e5f578 commit c8b55d0
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions consensus/src/block_preparer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,13 @@ impl BlockPreparer {
});
let start_time = Instant::now();

let (txns, max_txns_from_block_to_execute) = tokio::select! {
// Poll the block qc future until a QC is received. Ignore None outcomes.
Some(qc) = block_qc_fut => {
let block_voters = Some(qc.ledger_info().get_voters_bitvec().clone());
self.payload_manager.get_transactions(block, block_voters).await
},
result = self.payload_manager.get_transactions(block, None) => {
result
}
}?;
let block_voters = block_qc_fut
.await
.map(|qc| qc.ledger_info().get_voters_bitvec().clone());
let (txns, max_txns_from_block_to_execute) = self
.payload_manager
.get_transactions(block, block_voters)
.await?;
let txn_filter = self.txn_filter.clone();
let txn_deduper = self.txn_deduper.clone();
let txn_shuffler = self.txn_shuffler.clone();
Expand Down

0 comments on commit c8b55d0

Please sign in to comment.