Skip to content

Commit

Permalink
lets try this again
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse committed Nov 10, 2023
1 parent 6890be4 commit af7eec8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions crates/evm/evm/src/inspectors/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ impl InspectorStack {

impl<DB: DatabaseExt> Inspector<DB> for InspectorStack {
fn initialize_interp(&mut self, interpreter: &mut Interpreter<'_>, data: &mut EVMData<'_, DB>) {
let res = interpreter.instruction_result;
call_inspectors!(
[
&mut self.debugger,
Expand All @@ -368,7 +369,7 @@ impl<DB: DatabaseExt> Inspector<DB> for InspectorStack {
inspector.initialize_interp(interpreter, data);

// Allow inspectors to exit early
if interpreter.instruction_result != InstructionResult::Continue {
if interpreter.instruction_result != res {
#[allow(clippy::needless_return)]
return
}
Expand All @@ -377,6 +378,7 @@ impl<DB: DatabaseExt> Inspector<DB> for InspectorStack {
}

fn step(&mut self, interpreter: &mut Interpreter<'_>, data: &mut EVMData<'_, DB>) {
let res = interpreter.instruction_result;
call_inspectors!(
[
&mut self.fuzzer,
Expand All @@ -391,7 +393,7 @@ impl<DB: DatabaseExt> Inspector<DB> for InspectorStack {
inspector.step(interpreter, data);

// Allow inspectors to exit early
if interpreter.instruction_result != InstructionResult::Continue {
if interpreter.instruction_result != res {
#[allow(clippy::needless_return)]
return
}
Expand All @@ -415,6 +417,7 @@ impl<DB: DatabaseExt> Inspector<DB> for InspectorStack {
}

fn step_end(&mut self, interpreter: &mut Interpreter<'_>, data: &mut EVMData<'_, DB>) {
let res = interpreter.instruction_result;
call_inspectors!(
[
&mut self.debugger,
Expand All @@ -428,7 +431,7 @@ impl<DB: DatabaseExt> Inspector<DB> for InspectorStack {
inspector.step_end(interpreter, data);

// Allow inspectors to exit early
if interpreter.instruction_result != InstructionResult::Continue {
if interpreter.instruction_result != res {
#[allow(clippy::needless_return)]
return
}
Expand Down

0 comments on commit af7eec8

Please sign in to comment.