node: revise NodeTypes trait (#10665)

This commit is contained in:
Thomas Coratger
2024-09-03 05:52:53 -07:00
committed by GitHub
parent 020597da32
commit d30e3a4888
11 changed files with 140 additions and 62 deletions

View File

@ -18,7 +18,7 @@ use reth_evm::test_utils::MockExecutorProvider;
use reth_execution_types::Chain;
use reth_exex::{ExExContext, ExExEvent, ExExNotification};
use reth_network::{config::SecretKey, NetworkConfigBuilder, NetworkManager};
use reth_node_api::{FullNodeTypes, FullNodeTypesAdapter, NodeTypes};
use reth_node_api::{FullNodeTypes, FullNodeTypesAdapter, NodeTypes, NodeTypesWithEngine};
use reth_node_builder::{
components::{
Components, ComponentsBuilder, ConsensusBuilder, ExecutorBuilder, NodeComponentsBuilder,
@ -110,10 +110,13 @@ pub struct TestNode;
impl NodeTypes for TestNode {
type Primitives = ();
type Engine = EthEngineTypes;
type ChainSpec = ChainSpec;
}
impl NodeTypesWithEngine for TestNode {
type Engine = EthEngineTypes;
}
impl<N> Node<N> for TestNode
where
N: FullNodeTypes<Engine = EthEngineTypes, ChainSpec = ChainSpec>,