Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -718,14 +718,14 @@ fn parse_json_test_input(
/// The files names indicate the tree height, number of initial leaves and number of modified
/// leaves. The hash function used in the python tests is Pedersen.
/// The leaves values are their NodeIndices.
#[case(include_str!("../../../resources/fetch_patricia_paths_test_10_200_50.json"))]
#[case(include_str!("../../../resources/fetch_patricia_paths_test_10_5_2.json"))]
#[case(include_str!("../../../resources/fetch_patricia_paths_test_10_100_30.json"))]
#[case(include_str!("../../../resources/fetch_patricia_paths_test_8_120_70.json"))]
#[case(include_str!("../../../resources/fetch_patricia_paths_test_delete_leaves_10_200_50.json"))]
#[case(include_str!("../../../resources/fetch_patricia_paths_test_delete_leaves_10_5_2.json"))]
#[case(include_str!("../../../resources/fetch_patricia_paths_test_delete_leaves_10_100_30.json"))]
#[case(include_str!("../../../resources/fetch_patricia_paths_test_delete_leaves_8_120_70.json"))]
#[case(include_str!("../../resources/fetch_patricia_paths_test_10_200_50.json"))]
#[case(include_str!("../../resources/fetch_patricia_paths_test_10_5_2.json"))]
#[case(include_str!("../../resources/fetch_patricia_paths_test_10_100_30.json"))]
#[case(include_str!("../../resources/fetch_patricia_paths_test_8_120_70.json"))]
#[case(include_str!("../../resources/fetch_patricia_paths_test_delete_leaves_10_200_50.json"))]
#[case(include_str!("../../resources/fetch_patricia_paths_test_delete_leaves_10_5_2.json"))]
#[case(include_str!("../../resources/fetch_patricia_paths_test_delete_leaves_10_100_30.json"))]
#[case(include_str!("../../resources/fetch_patricia_paths_test_delete_leaves_8_120_70.json"))]
async fn test_fetch_patricia_paths_inner_from_json_facts_layout(#[case] input_data: &str) {
let (storage, leaf_indices, root_hash, height, expected_nodes) =
parse_json_test_input(input_data);
Expand All @@ -747,14 +747,14 @@ async fn test_fetch_patricia_paths_inner_from_json_facts_layout(#[case] input_da
/// The files names indicate the tree height, number of initial leaves and number of modified
/// leaves. The hash function used in the python tests is Pedersen.
/// The leaves values are their NodeIndices.
#[case(include_str!("../../../resources/fetch_patricia_paths_test_10_200_50.json"))]
#[case(include_str!("../../../resources/fetch_patricia_paths_test_10_5_2.json"))]
#[case(include_str!("../../../resources/fetch_patricia_paths_test_10_100_30.json"))]
#[case(include_str!("../../../resources/fetch_patricia_paths_test_8_120_70.json"))]
#[case(include_str!("../../../resources/fetch_patricia_paths_test_delete_leaves_10_200_50.json"))]
#[case(include_str!("../../../resources/fetch_patricia_paths_test_delete_leaves_10_5_2.json"))]
#[case(include_str!("../../../resources/fetch_patricia_paths_test_delete_leaves_10_100_30.json"))]
#[case(include_str!("../../../resources/fetch_patricia_paths_test_delete_leaves_8_120_70.json"))]
#[case(include_str!("../../resources/fetch_patricia_paths_test_10_200_50.json"))]
#[case(include_str!("../../resources/fetch_patricia_paths_test_10_5_2.json"))]
#[case(include_str!("../../resources/fetch_patricia_paths_test_10_100_30.json"))]
#[case(include_str!("../../resources/fetch_patricia_paths_test_8_120_70.json"))]
#[case(include_str!("../../resources/fetch_patricia_paths_test_delete_leaves_10_200_50.json"))]
#[case(include_str!("../../resources/fetch_patricia_paths_test_delete_leaves_10_5_2.json"))]
#[case(include_str!("../../resources/fetch_patricia_paths_test_delete_leaves_10_100_30.json"))]
#[case(include_str!("../../resources/fetch_patricia_paths_test_delete_leaves_8_120_70.json"))]
async fn test_fetch_patricia_paths_inner_from_json_index_layout(#[case] input_data: &str) {
let (mut storage, leaf_indices, root_hash, height, expected_nodes) =
parse_json_test_input(input_data);
Expand Down
4 changes: 2 additions & 2 deletions crates/starknet_committer/src/db/trie_traversal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ use crate::patricia_merkle_tree::tree::OriginalSkeletonTrieConfig;
use crate::patricia_merkle_tree::types::CompiledClassHash;

#[cfg(test)]
#[path = "facts_db/traversal_test.rs"]
mod traversal_test;
#[path = "fetch_patricia_paths_tests.rs"]
mod fetch_patricia_paths_tests;

/// Returns the Patricia inner nodes ([PreimageMap]) in the paths to the given `leaf_indices` in the
/// given tree according to the `root_hash` (including siblings).
Expand Down
Loading