@@ -15,10 +15,11 @@ use starknet_patricia::patricia_merkle_tree::updated_skeleton_tree::tree::{
1515 UpdatedSkeletonTree ,
1616 UpdatedSkeletonTreeImpl ,
1717} ;
18- use starknet_patricia_storage:: db_object:: HasStaticPrefix ;
18+ use starknet_patricia_storage:: db_object:: { EmptyKeyContext , HasStaticPrefix } ;
1919use starknet_patricia_storage:: map_storage:: MapStorage ;
2020
21- use crate :: db:: facts_db:: create_facts_tree:: create_original_skeleton_tree;
21+ use crate :: db:: facts_db:: db:: FactsNodeLayout ;
22+ use crate :: db:: trie_traversal:: create_original_skeleton_tree;
2223
2324pub async fn tree_computation_flow < L , TH > (
2425 leaf_modifications : LeafModifications < L > ,
@@ -28,17 +29,17 @@ pub async fn tree_computation_flow<L, TH>(
2829) -> FilledTreeImpl < L >
2930where
3031 TH : TreeHashFunction < L > + ' static ,
31- L : Leaf + HasStaticPrefix < KeyContext = ( ) > + ' static ,
32+ L : Leaf + HasStaticPrefix < KeyContext = EmptyKeyContext > + ' static ,
3233{
3334 let mut sorted_leaf_indices: Vec < NodeIndex > = leaf_modifications. keys ( ) . copied ( ) . collect ( ) ;
3435 let sorted_leaf_indices = SortedLeafIndices :: new ( & mut sorted_leaf_indices) ;
35- let mut original_skeleton = create_original_skeleton_tree (
36+ let mut original_skeleton = create_original_skeleton_tree :: < L , FactsNodeLayout > (
3637 storage,
3738 root_hash,
3839 sorted_leaf_indices,
3940 & config,
4041 & leaf_modifications,
41- & ( ) ,
42+ & EmptyKeyContext ,
4243 )
4344 . await
4445 . expect ( "Failed to create the original skeleton tree" ) ;
6667}
6768
6869pub async fn single_tree_flow_test <
69- L : Leaf + HasStaticPrefix < KeyContext = ( ) > + ' static ,
70+ L : Leaf + HasStaticPrefix < KeyContext = EmptyKeyContext > + ' static ,
7071 TH : TreeHashFunction < L > + ' static ,
7172> (
7273 leaf_modifications : LeafModifications < L > ,
@@ -90,7 +91,7 @@ pub async fn single_tree_flow_test<
9091 let json_hash = & json ! ( hash_result. 0 . to_hex_string( ) ) ;
9192 result_map. insert ( "root_hash" , json_hash) ;
9293 // Serlialize the storage modifications.
93- let json_storage = & json ! ( filled_tree. serialize( & ( ) ) ) ;
94+ let json_storage = & json ! ( filled_tree. serialize( & EmptyKeyContext ) ) ;
9495 result_map. insert ( "storage_changes" , json_storage) ;
9596 serde_json:: to_string ( & result_map) . expect ( "serialization failed" )
9697}
0 commit comments