Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions crates/interpreter/src/instructions/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ pub fn call<H: Host + ?Sized, SPEC: Spec>(interpreter: &mut Interpreter, host: &
interpreter.instruction_result = InstructionResult::FatalExternalError;
return;
};
let Some(mut gas_limit) = calc_call_gas::<H, SPEC>(
let Some(mut gas_limit) = calc_call_gas::<SPEC>(
interpreter,
is_cold,
has_transfer,
Expand Down Expand Up @@ -520,7 +520,7 @@ pub fn call_code<H: Host + ?Sized, SPEC: Spec>(interpreter: &mut Interpreter, ho
return;
};

let Some(mut gas_limit) = calc_call_gas::<H, SPEC>(
let Some(mut gas_limit) = calc_call_gas::<SPEC>(
interpreter,
is_cold,
value != U256::ZERO,
Expand Down Expand Up @@ -571,7 +571,7 @@ pub fn delegate_call<H: Host + ?Sized, SPEC: Spec>(interpreter: &mut Interpreter
return;
};
let Some(gas_limit) =
calc_call_gas::<H, SPEC>(interpreter, is_cold, false, false, local_gas_limit)
calc_call_gas::<SPEC>(interpreter, is_cold, false, false, local_gas_limit)
else {
return;
};
Expand Down Expand Up @@ -613,7 +613,7 @@ pub fn static_call<H: Host + ?Sized, SPEC: Spec>(interpreter: &mut Interpreter,
};

let Some(gas_limit) =
calc_call_gas::<H, SPEC>(interpreter, is_cold, false, false, local_gas_limit)
calc_call_gas::<SPEC>(interpreter, is_cold, false, false, local_gas_limit)
else {
return;
};
Expand Down
3 changes: 1 addition & 2 deletions crates/interpreter/src/instructions/contract/call_helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use crate::{
gas,
interpreter::Interpreter,
primitives::{Bytes, Spec, SpecId::*, U256},
Host,
};
use core::{cmp::min, ops::Range};

Expand Down Expand Up @@ -43,7 +42,7 @@ pub fn resize_memory_and_return_range(
}

#[inline]
pub fn calc_call_gas<H: Host + ?Sized, SPEC: Spec>(
pub fn calc_call_gas<SPEC: Spec>(
interpreter: &mut Interpreter,
is_cold: bool,
has_transfer: bool,
Expand Down