Skip to content

Commit 66f62ec

Browse files
committed
reuse code
1 parent 478319c commit 66f62ec

File tree

2 files changed

+5
-17
lines changed

2 files changed

+5
-17
lines changed

crates/execution/vm-interpreter/src/instructions.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -434,14 +434,14 @@ impl Instruction {
434434
pub fn info<const CANCUN: bool>(
435435
&self, cip645: bool, eip7939: bool,
436436
) -> &InstructionInfo {
437-
let instrs = if !CANCUN {
438-
&*INSTRUCTIONS
439-
} else if eip7939 {
437+
let instrs = if eip7939 {
440438
&*INSTRUCTIONS_EIP7939
441-
} else if !cip645 {
439+
} else if cip645 {
440+
&*INSTRUCTIONS_CIP645
441+
} else if CANCUN {
442442
&*INSTRUCTIONS_CANCUN
443443
} else {
444-
&*INSTRUCTIONS_CIP645
444+
&*INSTRUCTIONS
445445
};
446446

447447
instrs[*self as usize].as_ref().expect("A instruction is defined in Instruction enum, but it is not found in InstructionInfo struct; this indicates a logic failure in the code.")

crates/execution/vm-interpreter/src/interpreter/mod.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -395,18 +395,6 @@ impl<Cost: CostType, const CANCUN: bool> Interpreter<Cost, CANCUN> {
395395
+ *gas;
396396
}
397397

398-
// if self.do_trace {
399-
// context.trace_executed(
400-
// self.gasometer
401-
// .as_mut()
402-
// .expect(GASOMETER_PROOF)
403-
// .current_gas
404-
// .as_u256(),
405-
// self.stack.peek_top(self.last_stack_ret_len),
406-
// &self.mem,
407-
// );
408-
// }
409-
410398
// Advance
411399
match result {
412400
InstructionResult::JumpToPosition(position) => {

0 commit comments

Comments
 (0)