Skip to content

Commit

Permalink
NDEV-3403 Fixes in transaction_step.rs::do_continue
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-yazkov committed Nov 5, 2024
1 parent 2b35971 commit c631518
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions evm_loader/program/src/instruction/transaction_step.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,14 @@ pub fn do_continue<'a>(
let mut state_data = storage.read_executor_state();
let mut evm = storage.read_evm::<EvmBackend, NoopEventListener>();
let (mut backend, step_count) = if storage.steps_interrupted() > 0 {
(SyncedExecutorState::new(&mut account_storage), u64::MAX)
(
ExecutorState::new(&mut account_storage, &mut state_data),
u64::MAX,
)
} else {
(
ExecutorState::new(&mut account_storage, &mut state_data),
steps_count,
step_count,
)
};

Expand Down Expand Up @@ -176,7 +179,7 @@ fn finalize<'a, 'b>(
}

let status = if let Some((status, actions)) = results {
if status == ExitStatus::Interrupted {
if *status == ExitStatus::Interrupted {
accounts.apply_state_change(actions)?;
None
} else if accounts.allocate(actions)? == AllocateResult::Ready {
Expand Down

0 comments on commit c631518

Please sign in to comment.