Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(eth-sender): add early return in sending new transactions to not spam logs with errors #2425

Merged
merged 2 commits into from
Jul 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading