Skip to content

Commit

Permalink
fix(eth-sender): Don't resend already sent transactions in the same b…
Browse files Browse the repository at this point in the history
…lock (#2208)

Signed-off-by: tomg10 <lemures64@gmail.com>
  • Loading branch information
tomg10 committed Jun 11, 2024
1 parent 8c71733 commit 3538e9c
Showing 1 changed file with 9 additions and 3 deletions.
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

0 comments on commit 3538e9c

Please sign in to comment.