Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Fix query version bit flag being unsupported in versions other than 0 #825

Merged
merged 4 commits into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix versions in some tests
  • Loading branch information
xqft committed Jul 17, 2023
commit ab2ede322ed920a9b587be95b886b38cd02c10fc
4 changes: 2 additions & 2 deletions src/transaction/declare_v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -537,13 +537,13 @@ mod tests {
let path;
#[cfg(not(feature = "cairo_1_tests"))]
{
version = QUERY_VERSION_BASE.clone();
version = &2.into() | &QUERY_VERSION_BASE.clone();
path = PathBuf::from("starknet_programs/cairo2/fibonacci.sierra");
}

#[cfg(feature = "cairo_1_tests")]
{
version = QUERY_VERSION_BASE.clone();
version = &1.into() | &QUERY_VERSION_BASE.clone();
path = PathBuf::from("starknet_programs/cairo1/fibonacci.sierra");
}

Expand Down
6 changes: 3 additions & 3 deletions src/transaction/invoke_function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1055,16 +1055,16 @@ mod tests {
}

#[test]
fn invoke_version_one_with_no_nonce_with_query_base() {
fn invoke_version_one_with_no_nonce_with_query_base_should_fail() {
let expected_error = preprocess_invoke_function_fields(
Felt252::from_str_radix(
"112e35f48499939272000bd72eb840e502ca4c3aefa8800992e8defb746e0c9",
16,
)
.unwrap(),
None,
QUERY_VERSION_BASE.clone(),
&1.into() | &QUERY_VERSION_BASE.clone(),
);
assert!(expected_error.is_ok());
assert!(expected_error.is_err());
}
}