Skip to content

Commit

Permalink
Update execute.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
Brechtpd authored May 11, 2024
1 parent 8937a05 commit 9327211
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/src/builder/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,9 @@ impl TxExecStrategy for TkoTxExecStrategy {
let ResultAndState { result, state } = match evm.transact() {
Ok(result) => result,
Err(err) => {
// Clear the state for the next tx
evm.context.evm.journaled_state = JournaledState::new(spec_id, HashSet::new());

if is_optimistic {
continue;
}
Expand All @@ -256,9 +259,6 @@ impl TxExecStrategy for TkoTxExecStrategy {
EVMError::Transaction(invalid_transaction) => {
#[cfg(feature = "std")]
debug!("Invalid tx at {}: {:?}", tx_no, invalid_transaction);
// Clear the state
evm.context.evm.journaled_state =
JournaledState::new(spec_id, HashSet::new());
// skip the tx
continue;
}
Expand Down

0 comments on commit 9327211

Please sign in to comment.