chore(sdk): Define NodePrimitives::Block (#11399)

This commit is contained in:
Emilia Hane
2024-10-18 11:23:25 +02:00
committed by GitHub
parent 5859f93c56
commit cb604826b7
5 changed files with 38 additions and 11 deletions

View File

@ -11,7 +11,9 @@ use reth_ethereum_engine_primitives::{
};
use reth_evm_ethereum::execute::EthExecutorProvider;
use reth_network::NetworkHandle;
use reth_node_api::{ConfigureEvm, EngineValidator, FullNodeComponents, NodeTypesWithDB};
use reth_node_api::{
ConfigureEvm, EngineValidator, FullNodeComponents, NodePrimitives, NodeTypesWithDB,
};
use reth_node_builder::{
components::{
ComponentsBuilder, ConsensusBuilder, EngineValidatorBuilder, ExecutorBuilder,
@ -22,7 +24,7 @@ use reth_node_builder::{
BuilderContext, Node, NodeAdapter, NodeComponentsBuilder, PayloadBuilderConfig, PayloadTypes,
};
use reth_payload_builder::{PayloadBuilderHandle, PayloadBuilderService};
use reth_primitives::Header;
use reth_primitives::{Block, Header};
use reth_provider::CanonStateSubscriptions;
use reth_rpc::EthApi;
use reth_tracing::tracing::{debug, info};
@ -33,6 +35,14 @@ use reth_transaction_pool::{
use crate::{EthEngineTypes, EthEvmConfig};
/// Ethereum primitive types.
#[derive(Debug)]
pub struct EthPrimitives;
impl NodePrimitives for EthPrimitives {
type Block = Block;
}
/// Type configuration for a regular Ethereum node.
#[derive(Debug, Default, Clone, Copy)]
#[non_exhaustive]
@ -69,7 +79,7 @@ impl EthereumNode {
}
impl NodeTypes for EthereumNode {
type Primitives = ();
type Primitives = EthPrimitives;
type ChainSpec = ChainSpec;
}