Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into daniyar/pla-969-prote…
Browse files Browse the repository at this point in the history
…ctive-reads-metrics
  • Loading branch information
itegulov committed Jun 11, 2024
2 parents 80c9f29 + b43a881 commit 327c2f2
Show file tree
Hide file tree
Showing 2 changed files with 14 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
5 changes: 5 additions & 0 deletions core/node/vm_runner/src/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ impl VmRunner {
.await?
+ 1;
loop {
if *stop_receiver.borrow() {
tracing::info!("VM runner was interrupted");
return Ok(());
}

// Traverse all handles and filter out tasks that have been finished. Also propagates
// any panic/error that might have happened during the task's execution.
let mut retained_handles = Vec::new();
Expand Down

0 comments on commit 327c2f2

Please sign in to comment.