Skip to content

Commit

Permalink
refactor(cairo_native): remove cairo native flag duplications (#2607)
Browse files Browse the repository at this point in the history
  • Loading branch information
meship-starkware authored Dec 17, 2024
1 parent 469c23f commit 84a2a72
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions crates/blockifier/src/transaction/transactions_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,7 @@ fn expected_validate_call_info(
) -> Option<CallInfo> {
let retdata = match cairo_version {
CairoVersion::Cairo0 => Retdata::default(),
CairoVersion::Cairo1(RunnableCairo1::Casm) => retdata!(*constants::VALIDATE_RETDATA),
#[cfg(feature = "cairo_native")]
CairoVersion::Cairo1(RunnableCairo1::Native) => {
retdata!(*constants::VALIDATE_RETDATA)
}
CairoVersion::Cairo1(_) => retdata!(*constants::VALIDATE_RETDATA),
};
// Extra range check in regular (invoke) validate call, due to passing the calldata as an array.
let charged_resources = match tracked_resource {
Expand All @@ -223,15 +219,7 @@ fn expected_validate_call_info(
CairoVersion::Cairo0 => {
usize::from(entry_point_selector_name == constants::VALIDATE_ENTRY_POINT_NAME)
}
CairoVersion::Cairo1(RunnableCairo1::Casm) => {
if entry_point_selector_name == constants::VALIDATE_ENTRY_POINT_NAME {
7
} else {
2
}
}
#[cfg(feature = "cairo_native")]
CairoVersion::Cairo1(RunnableCairo1::Native) => {
CairoVersion::Cairo1(_) => {
if entry_point_selector_name == constants::VALIDATE_ENTRY_POINT_NAME {
7
} else {
Expand Down

0 comments on commit 84a2a72

Please sign in to comment.