Skip to content

Commit 70e8a20

Browse files
cptarturksew1
authored andcommitted
Only run cairo native is tracked resources is sierra gas
1 parent a2fe839 commit 70e8a20

File tree

1 file changed

+19
-20
lines changed
  • crates/cheatnet/src/runtime_extensions/call_to_blockifier_runtime_extension/execution

1 file changed

+19
-20
lines changed

crates/cheatnet/src/runtime_extensions/call_to_blockifier_runtime_extension/execution/entry_point.rs

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -176,26 +176,25 @@ pub fn execute_call_entry_point(
176176
context,
177177
),
178178
RunnableCompiledClass::V1Native(native_compiled_class_v1) => {
179-
// if context.tracked_resource_stack.last() == Some(&TrackedResource::CairoSteps) {
180-
// // We cannot run native with cairo steps as the tracked resources (it's a vm
181-
// // resouorce).
182-
// panic!("We want to test execution of native entry only");
183-
// // execute_entry_point_call_cairo1(
184-
// // call,
185-
// // compiled_class.casm(),
186-
// // state,
187-
// // context,
188-
// // )
189-
// } else {
190-
println!("Executing native entry point");
191-
execute_entry_point_call_native(
192-
&entry_point,
193-
&native_compiled_class_v1,
194-
state,
195-
cheatnet_state,
196-
context,
197-
)
198-
} // }
179+
if context.tracked_resource_stack.last() == Some(&TrackedResource::CairoSteps) {
180+
execute_entry_point_call_cairo1(
181+
entry_point.clone(),
182+
&native_compiled_class_v1.casm(),
183+
state,
184+
cheatnet_state,
185+
context,
186+
)
187+
} else {
188+
println!("Executing native entry point");
189+
execute_entry_point_call_native(
190+
&entry_point,
191+
&native_compiled_class_v1,
192+
state,
193+
cheatnet_state,
194+
context,
195+
)
196+
}
197+
}
199198
};
200199
context
201200
.tracked_resource_stack

0 commit comments

Comments
 (0)