@@ -6,7 +6,7 @@ use super::{
66 index:: { ChainIndex , ResolveNullTipset } ,
77 tipset_tracker:: TipsetTracker ,
88} ;
9- use crate :: db:: { EthMappingsStore , EthMappingsStoreExt , IndicesStore , IndicesStoreExt } ;
9+ use crate :: db:: { EthMappingsStore , EthMappingsStoreExt } ;
1010use crate :: interpreter:: { BlockMessages , VMTrace } ;
1111use crate :: libp2p_bitswap:: { BitswapStoreRead , BitswapStoreReadWrite } ;
1212use crate :: message:: { ChainMessage , Message as MessageTrait , SignedMessage } ;
@@ -82,9 +82,6 @@ pub struct ChainStore<DB> {
8282 /// Ethereum mappings store
8383 eth_mappings : Arc < dyn EthMappingsStore + Sync + Send > ,
8484
85- /// Indices store
86- indices : Arc < dyn IndicesStore + Sync + Send > ,
87-
8885 /// Needed by the Ethereum mapping.
8986 chain_config : Arc < ChainConfig > ,
9087}
@@ -121,7 +118,6 @@ where
121118 db : Arc < DB > ,
122119 heaviest_tipset_key_provider : Arc < dyn HeaviestTipsetKeyProvider + Sync + Send > ,
123120 eth_mappings : Arc < dyn EthMappingsStore + Sync + Send > ,
124- indices : Arc < dyn IndicesStore + Sync + Send > ,
125121 chain_config : Arc < ChainConfig > ,
126122 genesis_block_header : CachingBlockHeader ,
127123 ) -> anyhow:: Result < Self > {
@@ -139,7 +135,6 @@ where
139135 genesis_block_header,
140136 validated_blocks,
141137 eth_mappings,
142- indices,
143138 chain_config,
144139 } ;
145140
@@ -204,15 +199,6 @@ where
204199 . map ( |( cid, _) | cid) )
205200 }
206201
207- pub fn put_index < V : Serialize > ( & self , key : & Cid , value : & V ) -> Result < ( ) , Error > {
208- self . indices . write_obj ( key, value) ?;
209- Ok ( ( ) )
210- }
211-
212- pub fn get_tipset_key_by_events_root ( & self , key : & Cid ) -> Result < Option < TipsetKey > , Error > {
213- Ok ( self . indices . read_obj ( key) ?)
214- }
215-
216202 /// Expands tipset to tipset with all other headers in the same epoch using
217203 /// the tipset tracker.
218204 fn expand_tipset ( & self , header : CachingBlockHeader ) -> Result < Tipset , Error > {
@@ -754,15 +740,8 @@ mod tests {
754740 message_receipts : Cid :: new_v1 ( DAG_CBOR , MultihashCode :: Identity . digest ( & [ ] ) ) ,
755741 ..Default :: default ( )
756742 } ) ;
757- let cs = ChainStore :: new (
758- db. clone ( ) ,
759- db. clone ( ) ,
760- db. clone ( ) ,
761- db,
762- chain_config,
763- gen_block. clone ( ) ,
764- )
765- . unwrap ( ) ;
743+ let cs =
744+ ChainStore :: new ( db. clone ( ) , db. clone ( ) , db, chain_config, gen_block. clone ( ) ) . unwrap ( ) ;
766745
767746 assert_eq ! ( cs. genesis_block_header( ) , & gen_block) ;
768747 }
@@ -776,15 +755,7 @@ mod tests {
776755 ..Default :: default ( )
777756 } ) ;
778757
779- let cs = ChainStore :: new (
780- db. clone ( ) ,
781- db. clone ( ) ,
782- db. clone ( ) ,
783- db,
784- chain_config,
785- gen_block,
786- )
787- . unwrap ( ) ;
758+ let cs = ChainStore :: new ( db. clone ( ) , db. clone ( ) , db, chain_config, gen_block) . unwrap ( ) ;
788759
789760 let cid = Cid :: new_v1 ( DAG_CBOR , MultihashCode :: Blake2b256 . digest ( & [ 1 , 2 , 3 ] ) ) ;
790761 assert ! ( !cs. is_block_validated( & cid) ) ;
0 commit comments