From c657f42d773d841b4ac3e934d26de66d60b001ef Mon Sep 17 00:00:00 2001 From: Tao Zhu <82401714+taozhu-chicago@users.noreply.github.com> Date: Mon, 19 Dec 2022 10:10:16 -0600 Subject: [PATCH] remove a wrapper function (#29305) --- core/src/unprocessed_transaction_storage.rs | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/core/src/unprocessed_transaction_storage.rs b/core/src/unprocessed_transaction_storage.rs index 532fd3da8..631239b22 100644 --- a/core/src/unprocessed_transaction_storage.rs +++ b/core/src/unprocessed_transaction_storage.rs @@ -542,27 +542,14 @@ impl ThreadLocalUnprocessedPackets { ) } - fn filter_forwardable_packets_and_add_batches( - &mut self, - bank: Arc, - forward_packet_batches_by_accounts: &mut ForwardPacketBatchesByAccounts, - ) -> FilterForwardingResults { - self.filter_and_forward_with_account_limits( - bank, - forward_packet_batches_by_accounts, - UNPROCESSED_BUFFER_STEP_SIZE, - ) - } - /// Filter out packets that fail to sanitize, or are no longer valid (could be /// too old, a duplicate of something already processed). Doing this in batches to avoid /// checking bank's blockhash and status cache per transaction which could be bad for performance. /// Added valid and sanitized packets to forwarding queue. - fn filter_and_forward_with_account_limits( + fn filter_forwardable_packets_and_add_batches( &mut self, bank: Arc, forward_buffer: &mut ForwardPacketBatchesByAccounts, - batch_size: usize, ) -> FilterForwardingResults { let mut total_forwardable_tracer_packets: usize = 0; let mut total_tracer_packets_in_buffer: usize = 0; @@ -582,7 +569,7 @@ impl ThreadLocalUnprocessedPackets { new_priority_queue.extend( original_priority_queue .drain_desc() - .chunks(batch_size) + .chunks(UNPROCESSED_BUFFER_STEP_SIZE) .into_iter() .flat_map(|packets_to_process| { // Only process packets not yet forwarded