Skip to content

Commit e869262

Browse files
committed
Do not run pre_execute_syscall for get_execution_info_v2
1 parent e5c0d73 commit e869262

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

crates/cheatnet/src/runtime_extensions/native/native_syscall_handler.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -211,15 +211,8 @@ impl StarknetSyscallHandler for &mut CheatableNativeSyscallHandler<'_> {
211211

212212
#[expect(clippy::too_many_lines)]
213213
fn get_execution_info_v2(&mut self, remaining_gas: &mut u64) -> SyscallResult<ExecutionInfoV2> {
214-
self.pre_execute_syscall(
215-
remaining_gas,
216-
self.native_syscall_handler
217-
.gas_costs()
218-
.syscalls
219-
.get_execution_info
220-
.base_syscall_cost(),
221-
SyscallSelector::GetBlockHash,
222-
)?;
214+
// We don't need to call pre_execute_syscall here because the call to `get_execution_info_v2`
215+
// on the native syscall handler is does that internally, and we don't want to do it twice.
223216

224217
let original_data = self
225218
.native_syscall_handler

0 commit comments

Comments
 (0)