diff --git a/core/src/banking_stage/consumer.rs b/core/src/banking_stage/consumer.rs index 08c61ac06524d8..83a55b53b189a1 100644 --- a/core/src/banking_stage/consumer.rs +++ b/core/src/banking_stage/consumer.rs @@ -462,7 +462,7 @@ impl Consumer { &self, bank: &Arc, txs: &[SanitizedTransaction], - max_slot_ages: &[Slot], + max_slot_ages: &mut [Slot], ) -> ProcessTransactionBatchOutput { let ( (transaction_costs, transactions_qos_results, cost_model_throttled_transactions_count), @@ -478,6 +478,7 @@ impl Consumer { .map(|(tx, max_slot_age, qos_result)| match qos_result { Ok(_) => { if *max_slot_age < bank.slot() { + *max_slot_age = 0; // Sentinal value to indicate transaction was sanitized before epoch boundary Err(TransactionError::BlockhashNotFound) } else { // TODO: Need to check that look-up tables have not been closed diff --git a/core/src/banking_stage/worker.rs b/core/src/banking_stage/worker.rs index b859a84dd9cc12..4744a3d3858c0f 100644 --- a/core/src/banking_stage/worker.rs +++ b/core/src/banking_stage/worker.rs @@ -109,10 +109,13 @@ impl Worker { } /// Consume a single batch. - fn consume(&self, bank: &Arc, consume_work: ConsumeWork) -> Result<(), WorkerError> { - let summary = - self.consumer - .process_and_record_transactions(bank, &consume_work.transactions, 0); + fn consume(&self, bank: &Arc, mut consume_work: ConsumeWork) -> Result<(), WorkerError> { + let summary = self.consumer.process_and_record_aged_transactions( + bank, + &consume_work.transactions, + &mut consume_work.max_age_slots, + ); + self.consumed_sender.send(FinishedConsumeWork { work: consume_work, retryable_indexes: summary