Update reported tx count to exclude errors (#4201)
This commit is contained in:
@ -114,13 +114,23 @@ impl BankForks {
|
||||
.banks
|
||||
.get(&root)
|
||||
.expect("root bank didn't exist in bank_forks");
|
||||
let root_tx_count = root_bank
|
||||
.parents()
|
||||
.last()
|
||||
.map(|bank| bank.transaction_count())
|
||||
.unwrap_or(0);
|
||||
root_bank.squash();
|
||||
let new_tx_count = root_bank.transaction_count();
|
||||
self.prune_non_root(root);
|
||||
|
||||
inc_new_counter_info!(
|
||||
"bank-forks_set_root_ms",
|
||||
timing::duration_as_ms(&set_root_start.elapsed()) as usize
|
||||
);
|
||||
inc_new_counter_info!(
|
||||
"bank-forks_set_root_tx_count",
|
||||
(new_tx_count - root_tx_count) as usize
|
||||
);
|
||||
}
|
||||
|
||||
pub fn root(&self) -> u64 {
|
||||
|
@ -357,6 +357,10 @@ impl BankingStage {
|
||||
debug!("processed: {} ", processed_transactions.len());
|
||||
// unlock all the accounts with errors which are filtered by the above `filter_map`
|
||||
if !processed_transactions.is_empty() {
|
||||
inc_new_counter_info!(
|
||||
"banking_stage-record_transactions",
|
||||
processed_transactions.len()
|
||||
);
|
||||
let hash = hash_transactions(&processed_transactions);
|
||||
// record and unlock will unlock all the successful transactions
|
||||
poh.lock()
|
||||
|
Reference in New Issue
Block a user