Skip to content

Commit

Permalink
feat(eth-sender): add early return in sending new transactions to not…
Browse files Browse the repository at this point in the history
… spam logs with errors (#2425)

Signed-off-by: tomg10 <[email protected]>
  • Loading branch information
tomg10 authored Jul 11, 2024
1 parent b0cd078 commit 192f2a3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion core/node/eth_sender/src/eth_tx_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,19 @@ impl EthTxManager {
.await
.unwrap();

tracing::info!(
"Sending {} {operator_type:?} new transactions",
new_eth_tx.len()
);
for tx in new_eth_tx {
let _ = self.send_eth_tx(storage, &tx, 0, current_block).await;
let result = self.send_eth_tx(storage, &tx, 0, current_block).await;
// If one of the transactions doesn't succeed, this means we should return
// as new transactions have increasing nonces, so they will also result in an error
// about gapped nonces
if result.is_err() {
tracing::info!("Skipping sending rest of new transactions because of error");
break;
}
}
}
}
Expand Down

0 comments on commit 192f2a3

Please sign in to comment.