Skip to content

Commit

Permalink
chore: log failed transactions results
Browse files Browse the repository at this point in the history
  • Loading branch information
keroro520 committed Jul 19, 2021
1 parent 3e56dbc commit f85715d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tx-pool/src/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -969,11 +969,15 @@ impl TxPoolService {
let total = txs.len();
let mut count = 0usize;
for tx in txs {
if self._process_tx(tx, None).await.is_err() {
let tx_hash = tx.hash();
if let Err(err) = self._process_tx(tx, None).await {
error!("failed to process {:#x}, error: {:?}", tx_hash, err);
count += 1;
}
}
info!("{}/{} transactions are failed to process", count, total);
if count != 0 {
info!("{}/{} transactions are failed to process", count, total);
}
}

pub(crate) async fn clear_pool(&mut self, new_snapshot: Arc<Snapshot>) {
Expand Down

0 comments on commit f85715d

Please sign in to comment.