From c4aa70b918b90784f40a90927e80f70c1789793a Mon Sep 17 00:00:00 2001 From: Tzahi Taub Date: Thu, 13 Jun 2024 16:55:49 +0300 Subject: [PATCH] refactor(skeleton): rename updated skeleton compute file to create_tree_helper --- .../src/patricia_merkle_tree/updated_skeleton_tree.rs | 2 +- ...compute_updated_skeleton_tree.rs => create_tree_helper.rs} | 4 ++-- ...dated_skeleton_tree_test.rs => create_tree_helper_test.rs} | 2 +- .../src/patricia_merkle_tree/updated_skeleton_tree/tree.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/{compute_updated_skeleton_tree.rs => create_tree_helper.rs} (99%) rename crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/{compute_updated_skeleton_tree_test.rs => create_tree_helper_test.rs} (99%) diff --git a/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree.rs b/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree.rs index f2c54106..2869b48e 100644 --- a/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree.rs +++ b/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree.rs @@ -1,4 +1,4 @@ -pub mod compute_updated_skeleton_tree; +pub mod create_tree_helper; pub mod errors; pub mod hash_function; pub mod node; diff --git a/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/compute_updated_skeleton_tree.rs b/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/create_tree_helper.rs similarity index 99% rename from crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/compute_updated_skeleton_tree.rs rename to crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/create_tree_helper.rs index 402c843b..9e1ad41e 100644 --- a/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/compute_updated_skeleton_tree.rs +++ b/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/create_tree_helper.rs @@ -17,8 +17,8 @@ use crate::patricia_merkle_tree::updated_skeleton_tree::tree::UpdatedSkeletonTre use crate::patricia_merkle_tree::updated_skeleton_tree::tree::UpdatedSkeletonTreeResult; #[cfg(test)] -#[path = "compute_updated_skeleton_tree_test.rs"] -pub mod compute_updated_skeleton_tree_test; +#[path = "create_tree_helper_test.rs"] +pub mod create_tree_helper_test; #[derive(Debug, PartialEq, Eq)] /// A temporary skeleton node used during the computation of the updated skeleton tree. diff --git a/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/compute_updated_skeleton_tree_test.rs b/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/create_tree_helper_test.rs similarity index 99% rename from crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/compute_updated_skeleton_tree_test.rs rename to crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/create_tree_helper_test.rs index 79bad67b..b9f024a7 100644 --- a/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/compute_updated_skeleton_tree_test.rs +++ b/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/create_tree_helper_test.rs @@ -14,7 +14,7 @@ use crate::patricia_merkle_tree::original_skeleton_tree::node::OriginalSkeletonN use crate::patricia_merkle_tree::original_skeleton_tree::tree::OriginalSkeletonNodeMap; use crate::patricia_merkle_tree::original_skeleton_tree::tree::OriginalSkeletonTreeImpl; use crate::patricia_merkle_tree::types::{NodeIndex, SubTreeHeight}; -use crate::patricia_merkle_tree::updated_skeleton_tree::compute_updated_skeleton_tree::{ +use crate::patricia_merkle_tree::updated_skeleton_tree::create_tree_helper::{ get_path_to_lca, has_leaves_on_both_sides, TempSkeletonNode, }; use crate::patricia_merkle_tree::updated_skeleton_tree::node::UpdatedSkeletonNode; diff --git a/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/tree.rs b/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/tree.rs index ab1da307..d3470c5a 100644 --- a/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/tree.rs +++ b/crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/tree.rs @@ -4,7 +4,7 @@ use crate::patricia_merkle_tree::node_data::leaf::{LeafModifications, SkeletonLe use crate::patricia_merkle_tree::original_skeleton_tree::node::OriginalSkeletonNode; use crate::patricia_merkle_tree::original_skeleton_tree::tree::OriginalSkeletonTree; use crate::patricia_merkle_tree::types::NodeIndex; -use crate::patricia_merkle_tree::updated_skeleton_tree::compute_updated_skeleton_tree::TempSkeletonNode; +use crate::patricia_merkle_tree::updated_skeleton_tree::create_tree_helper::TempSkeletonNode; use crate::patricia_merkle_tree::updated_skeleton_tree::errors::UpdatedSkeletonTreeError; use crate::patricia_merkle_tree::updated_skeleton_tree::node::UpdatedSkeletonNode;