Skip to content

Commit

Permalink
chore: add default generics for InterpreterTypes (#2070)
Browse files Browse the repository at this point in the history
  • Loading branch information
klkvr authored Feb 12, 2025
1 parent c12a95e commit be3b6c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions crates/handler/src/inspector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ use auto_impl::auto_impl;
use context::{Cfg, JournalEntry, JournaledState};
use context_interface::{result::ResultAndState, ContextTrait, Database, Transaction};
use interpreter::{
CallInputs, CallOutcome, CreateInputs, CreateOutcome, EOFCreateInputs, FrameInput,
InitialAndFloorGas, Interpreter, InterpreterTypes,
interpreter::EthInterpreter, CallInputs, CallOutcome, CreateInputs, CreateOutcome,
EOFCreateInputs, FrameInput, InitialAndFloorGas, Interpreter, InterpreterTypes,
};
use primitives::{Address, Log, U256};
use state::EvmState;
use std::{vec, vec::Vec};

/// EVM [Interpreter] callbacks.
#[auto_impl(&mut, Box)]
pub trait Inspector<CTX, INTR: InterpreterTypes> {
pub trait Inspector<CTX, INTR: InterpreterTypes = EthInterpreter> {
/// Called before the interpreter is initialized.
///
/// If `interp.instruction_result` is set to anything other than [interpreter::InstructionResult::Continue] then the execution of the interpreter
Expand Down
2 changes: 1 addition & 1 deletion crates/interpreter/src/interpreter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use subroutine_stack::SubRoutineImpl;

#[derive(Debug, Clone)]
#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))]
pub struct Interpreter<WIRE: InterpreterTypes> {
pub struct Interpreter<WIRE: InterpreterTypes = EthInterpreter> {
pub bytecode: WIRE::Bytecode,
pub stack: WIRE::Stack,
pub return_data: WIRE::ReturnData,
Expand Down

0 comments on commit be3b6c5

Please sign in to comment.