Skip to content

Commit

Permalink
Revert "feat(inspector:zk): delay startup migration"
Browse files Browse the repository at this point in the history
This reverts commit 71ca065.
  • Loading branch information
Karrq committed Nov 18, 2024
1 parent 5f1f3b2 commit a1df91d
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions crates/cheatcodes/src/inspector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1473,14 +1473,8 @@ where {
};
let prev = account.info.nonce;
account.info.nonce = prev.saturating_sub(1);
let nonce = account.info.nonce;

if self.startup_zk {
self.startup_zk = false; // We only do this once.
self.select_zk_vm(ecx_inner, None);
}

trace!(target: "cheatcodes", %sender, nonce, prev, "corrected nonce");
trace!(target: "cheatcodes", %sender, nonce=account.info.nonce, prev, "corrected nonce");
}

if call.target_address == CHEATCODE_ADDRESS {
Expand Down Expand Up @@ -1980,6 +1974,11 @@ impl Inspector<&mut dyn DatabaseExt> for Cheatcodes {
ecx.env.tx.gas_price = gas_price;
}

if self.startup_zk && !self.use_zk_vm {
self.startup_zk = false; // We only do this once.
self.select_zk_vm(ecx, None);
}

// Record gas for current frame.
if self.gas_metering.paused {
self.gas_metering.paused_frames.push(interpreter.gas);
Expand Down

0 comments on commit a1df91d

Please sign in to comment.