@@ -2,27 +2,29 @@ use std::collections::HashMap;
22
33use async_trait:: async_trait;
44use starknet_api:: core:: ContractAddress ;
5- use starknet_api:: hash:: HashOutput ;
6- use starknet_patricia:: patricia_merkle_tree:: filled_tree:: node:: FilledNode ;
5+ use starknet_patricia:: db_layout:: { NodeLayout , TrieType } ;
76use starknet_patricia:: patricia_merkle_tree:: filled_tree:: tree:: FilledTree ;
87use starknet_patricia:: patricia_merkle_tree:: node_data:: leaf:: { Leaf , LeafModifications } ;
9- use starknet_patricia:: patricia_merkle_tree:: types:: { NodeIndex , SortedLeafIndices } ;
8+ use starknet_patricia:: patricia_merkle_tree:: types:: NodeIndex ;
109use starknet_patricia:: patricia_merkle_tree:: updated_skeleton_tree:: hash_function:: TreeHashFunction ;
1110use starknet_patricia_storage:: db_object:: { EmptyKeyContext , HasStaticPrefix } ;
1211use starknet_patricia_storage:: errors:: SerializationResult ;
1312use starknet_patricia_storage:: storage_trait:: { DbHashMap , Storage } ;
1413
1514use crate :: block_committer:: input:: { ReaderConfig , StarknetStorageValue } ;
16- use crate :: db:: db_layout:: NodeLayout ;
1715use crate :: db:: facts_db:: types:: FactsDbInitialRead ;
1816use crate :: db:: forest_trait:: { ForestReader , ForestWriter } ;
1917use crate :: db:: index_db:: leaves:: {
2018 IndexLayoutCompiledClassHash ,
2119 IndexLayoutContractState ,
2220 IndexLayoutStarknetStorageValue ,
23- TrieType ,
2421} ;
25- use crate :: db:: index_db:: types:: { IndexFilledNode , IndexLayoutSubTree , IndexNodeContext } ;
22+ use crate :: db:: index_db:: types:: {
23+ EmptyNodeData ,
24+ IndexFilledNode ,
25+ IndexLayoutSubTree ,
26+ IndexNodeContext ,
27+ } ;
2628use crate :: db:: trie_traversal:: { create_classes_trie, create_contracts_trie, create_storage_tries} ;
2729use crate :: forest:: filled_forest:: FilledForest ;
2830use crate :: forest:: forest_errors:: ForestResult ;
@@ -48,18 +50,14 @@ where
4850 L : HasStaticPrefix < KeyContext = TrieType > ,
4951 TreeHashFunctionImpl : TreeHashFunction < L > ,
5052{
51- type NodeData = ( ) ;
53+ type NodeData = EmptyNodeData ;
5254 type NodeDbObject = IndexFilledNode < L > ;
5355 type DeserializationContext = IndexNodeContext ;
5456 type SubTree = IndexLayoutSubTree < ' a > ;
5557
5658 fn generate_key_context ( trie_type : TrieType ) -> <L as HasStaticPrefix >:: KeyContext {
5759 trie_type
5860 }
59-
60- fn get_filled_node ( node_db_object : Self :: NodeDbObject ) -> FilledNode < L , Self :: NodeData > {
61- node_db_object. 0
62- }
6361}
6462
6563// TODO(Ariel): define an IndexDbInitialRead empty type, and check whether each tree is empty inside
0 commit comments