@@ -5,24 +5,40 @@ use reth_consensus::Consensus;
55use reth_db:: { static_file:: BlockHashMask , tables} ;
66use reth_db_api:: { cursor:: DbCursorRO , transaction:: DbTx } ;
77use reth_node_types:: { FullNodePrimitives , NodeTypesWithDB } ;
8- use reth_primitives:: { BlockBody , StaticFileSegment } ;
8+ use reth_primitives:: StaticFileSegment ;
99use reth_provider:: {
10- providers:: ProviderNodeTypes , ChainStateBlockReader , ChainStateBlockWriter , ProviderFactory ,
11- StaticFileProviderFactory , StatsReader ,
10+ providers:: { NodeTypesForProvider , ProviderNodeTypes } ,
11+ ChainStateBlockReader , ChainStateBlockWriter , ProviderFactory , StaticFileProviderFactory ,
12+ StatsReader ,
1213} ;
1314use reth_storage_errors:: provider:: ProviderResult ;
1415use std:: { collections:: BTreeMap , sync:: Arc } ;
1516
1617/// A helper trait with requirements for [`ProviderNodeTypes`] to be used within [`TreeExternals`].
17- pub trait TreeNodeTypes :
18- ProviderNodeTypes < Primitives : FullNodePrimitives < BlockBody = BlockBody > >
18+ pub trait NodeTypesForTree :
19+ NodeTypesForProvider <
20+ Primitives : FullNodePrimitives <
21+ Block = reth_primitives:: Block ,
22+ BlockBody = reth_primitives:: BlockBody ,
23+ > ,
24+ >
1925{
2026}
21- impl < T > TreeNodeTypes for T where
22- T : ProviderNodeTypes < Primitives : FullNodePrimitives < BlockBody = BlockBody > >
27+
28+ impl < T > NodeTypesForTree for T where
29+ T : NodeTypesForProvider <
30+ Primitives : FullNodePrimitives <
31+ Block = reth_primitives:: Block ,
32+ BlockBody = reth_primitives:: BlockBody ,
33+ > ,
34+ >
2335{
2436}
2537
38+ /// A helper trait with requirements for [`ProviderNodeTypes`] to be used within [`TreeExternals`].
39+ pub trait TreeNodeTypes : ProviderNodeTypes + NodeTypesForTree { }
40+ impl < T > TreeNodeTypes for T where T : ProviderNodeTypes + NodeTypesForTree { }
41+
2642/// A container for external components.
2743///
2844/// This is a simple container for external components used throughout the blockchain tree
0 commit comments