From 77125cd39056189d36e0d55b4d7972363eb0e227 Mon Sep 17 00:00:00 2001 From: Haoran Yi Date: Fri, 4 Feb 2022 14:47:56 -0600 Subject: [PATCH] refactor packet bach processing fix empty --- core/src/banking_stage.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/core/src/banking_stage.rs b/core/src/banking_stage.rs index 94174821a2..c1d2175208 100644 --- a/core/src/banking_stage.rs +++ b/core/src/banking_stage.rs @@ -561,6 +561,7 @@ impl BankingStage { end_of_slot.next_slot_leader, banking_stage_stats, ); +<<<<<<< HEAD let end_of_slot_filtered_invalid_count = original_unprocessed_indexes .len() @@ -629,6 +630,7 @@ impl BankingStage { .. } = process_transactions_summary; +<<<<<<< HEAD if reached_max_poh_height || !Bank::should_bank_still_be_processing_txs( &bank_creation_time, @@ -707,7 +709,6 @@ impl BankingStage { } } }); - proc_start.stop(); debug!( @@ -2015,7 +2016,7 @@ impl BankingStage { banking_stage_stats: &mut BankingStageStats, slot_metrics_tracker: &mut LeaderSlotMetricsTracker, ) { - if Self::packet_has_more_unprocessed_transactions(&packet_indexes) { + if !packet_indexes.is_empty() { if unprocessed_packet_batches.len() >= batch_limit { *dropped_packet_batches_count += 1; if let Some(dropped_batch) = unprocessed_packet_batches.pop_front() { @@ -2041,10 +2042,6 @@ impl BankingStage { } } - fn packet_has_more_unprocessed_transactions(packet_indexes: &[usize]) -> bool { - !packet_indexes.is_empty() - } - pub fn join(self) -> thread::Result<()> { for bank_thread_hdl in self.bank_thread_hdls { bank_thread_hdl.join()?;