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

fix(eth-sender): Don't resend already sent transactions in the same block #2208

Merged
merged 1 commit into from
Jun 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
12 changes: 9 additions & 3 deletions core/node/eth_sender/src/eth_tx_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -540,9 +540,15 @@ impl EthTxManager {
.eth_sender_dal()
.get_block_number_on_first_sent_attempt(tx.id)
.await
.unwrap()
.unwrap_or(l1_block_numbers.latest.0);
return Ok(Some((tx, first_sent_at_block)));
.unwrap();
// the transaction may still be included in block, we shouldn't resend it yet
if first_sent_at_block == Some(l1_block_numbers.latest.0) {
continue;
}
return Ok(Some((
tx,
first_sent_at_block.unwrap_or(l1_block_numbers.latest.0),
)));
}

// If on finalized block sender's nonce was > tx.nonce,
Expand Down
Loading