Skip to content

Commit

Permalink
accumulate error metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
apfitzge committed Jan 9, 2024
1 parent 925f92d commit 6aa6146
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions core/src/banking_stage/consumer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ impl Consumer {
txs: &[SanitizedTransaction],
chunk_offset: usize,
) -> ProcessTransactionBatchOutput {
let mut error_counters = TransactionErrorMetrics::default(); // todo how to actually accumulate these?
let mut error_counters = TransactionErrorMetrics::default();
let pre_results = vec![Ok(()); txs.len()];
let check_results =
bank.check_transactions(txs, &pre_results, MAX_PROCESSING_AGE, &mut error_counters);
Expand Down Expand Up @@ -437,12 +437,19 @@ impl Consumer {
})
.collect();

self.process_and_record_transactions_with_pre_results(
let mut output = self.process_and_record_transactions_with_pre_results(
bank,
txs,
chunk_offset,
fee_check_results.into_iter(),
)
);

// Accumulate error counters from the initial checks into final results
output
.execute_and_commit_transactions_output
.error_counters
.accumulate(&error_counters);
output
}

pub fn process_and_record_aged_transactions(
Expand Down

0 comments on commit 6aa6146

Please sign in to comment.