diff --git a/crates/committer/src/patricia_merkle_tree/filled_tree.rs b/crates/committer/src/patricia_merkle_tree/filled_tree.rs index 161448dd..f733e229 100644 --- a/crates/committer/src/patricia_merkle_tree/filled_tree.rs +++ b/crates/committer/src/patricia_merkle_tree/filled_tree.rs @@ -7,6 +7,7 @@ use crate::patricia_merkle_tree::errors::FilledTreeError; use crate::patricia_merkle_tree::filled_node::FilledNode; use crate::patricia_merkle_tree::types::{LeafDataTrait, NodeIndex}; use crate::storage::storage_trait::Storage; +use crate::storage::storage_trait::StorageKey; /// Consider a Patricia-Merkle Tree which has been updated with new leaves. /// FilledTree consists of all nodes which were modified in the update, including their updated @@ -14,7 +15,8 @@ use crate::storage::storage_trait::Storage; pub(crate) trait FilledTree { /// Serializes the tree into storage. Returns hash set of keys of the serialized nodes, /// if successful. - fn serialize(&self, storage: impl Storage) -> Result, FilledTreeError>; + fn serialize(&self, storage: &mut impl Storage) + -> Result, FilledTreeError>; } pub(crate) struct FilledTreeImpl { diff --git a/crates/committer/src/patricia_merkle_tree/original_skeleton_tree.rs b/crates/committer/src/patricia_merkle_tree/original_skeleton_tree.rs index 710029d2..c51a6c59 100644 --- a/crates/committer/src/patricia_merkle_tree/original_skeleton_tree.rs +++ b/crates/committer/src/patricia_merkle_tree/original_skeleton_tree.rs @@ -15,11 +15,11 @@ pub(crate) type OriginalSkeletonTreeResult = Result { fn compute_original_skeleton_tree( - storage: impl Storage, - leaf_indices: &[NodeIndex], + storage: &impl Storage, + leaf_indices: [NodeIndex], root_hash: HashOutput, tree_height: TreeHeight, - ) -> OriginalSkeletonTreeResult>; + ) -> OriginalSkeletonTreeResult>; /// Computes and returns updated skeleton tree. fn compute_updated_skeleton_tree(