Skip to content

Commit cfab075

Browse files
committed
chore: fix instruction overriding
1 parent b25c897 commit cfab075

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/helpers.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use revm::{
33
context_interface::context::ContextError,
44
handler::{instructions::EthInstructions, EthFrame, EthPrecompiles},
55
inspector::NoOpInspector,
6-
interpreter::{interpreter::EthInterpreter, Interpreter, InterpreterTypes},
6+
interpreter::{interpreter::EthInterpreter, InstructionContext, InterpreterTypes},
77
Context, Database, Journal,
88
};
99

@@ -23,8 +23,7 @@ pub type Instruction<Db> = revm::interpreter::Instruction<EthInterpreter, Ctx<Db
2323
/// An [`Instruction`] that sets a [`ContextError`] in the [`Ctx`] whenever it
2424
/// is executed.
2525
pub fn forbidden<Db: Database, Int: InterpreterTypes>(
26-
_interpreter: &mut Interpreter<Int>,
27-
ctx: &mut Ctx<Db>,
26+
ctx: InstructionContext<'_, Ctx<Db>, Int>,
2827
) {
29-
ctx.error = Err(ContextError::Custom("forbidden opcode".to_string()));
28+
ctx.host.error = Err(ContextError::Custom("forbidden opcode".to_string()));
3029
}

0 commit comments

Comments
 (0)