@@ -7,8 +7,9 @@ use std::{
7
7
sync:: Arc ,
8
8
} ;
9
9
10
+ use reth_evm:: { ConfigureEvm , ConfigureEvmEnv } ;
10
11
use reth_network:: NetworkPrimitives ;
11
- use reth_node_api:: { BlockBody , EngineTypes , FullNodeComponents } ;
12
+ use reth_node_api:: { BlockBody , EngineTypes , FullNodeComponents , NodePrimitives } ;
12
13
use reth_node_core:: {
13
14
dirs:: { ChainPath , DataDirPath } ,
14
15
node_config:: NodeConfig ,
@@ -235,3 +236,31 @@ where
235
236
> ,
236
237
{
237
238
}
239
+
240
+ /// This is a type alias to make type bounds simpler when we have a [`NodePrimitives`] and need a
241
+ /// [`ConfigureEvmEnv`] whose associated types match the [`NodePrimitives`] associated types.
242
+ pub trait ConfigureEvmEnvFor < N : NodePrimitives > :
243
+ ConfigureEvmEnv < Header = N :: BlockHeader , Transaction = N :: SignedTx >
244
+ {
245
+ }
246
+
247
+ impl < N , C > ConfigureEvmEnvFor < N > for C
248
+ where
249
+ N : NodePrimitives ,
250
+ C : ConfigureEvmEnv < Header = N :: BlockHeader , Transaction = N :: SignedTx > ,
251
+ {
252
+ }
253
+
254
+ /// This is a type alias to make type bounds simpler when we have a [`NodePrimitives`] and need a
255
+ /// [`ConfigureEvm`] whose associated types match the [`NodePrimitives`] associated types.
256
+ pub trait ConfigureEvmFor < N : NodePrimitives > :
257
+ ConfigureEvm < Header = N :: BlockHeader , Transaction = N :: SignedTx >
258
+ {
259
+ }
260
+
261
+ impl < N , C > ConfigureEvmFor < N > for C
262
+ where
263
+ N : NodePrimitives ,
264
+ C : ConfigureEvm < Header = N :: BlockHeader , Transaction = N :: SignedTx > ,
265
+ {
266
+ }
0 commit comments