mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: NodePrimitivesProvider (#12855)
This commit is contained in:
@ -28,7 +28,7 @@ use reth_node_core::{
|
||||
primitives::Head,
|
||||
};
|
||||
use reth_node_events::{cl::ConsensusLayerHealthEvents, node};
|
||||
use reth_primitives::EthereumHardforks;
|
||||
use reth_primitives::{EthPrimitives, EthereumHardforks};
|
||||
use reth_provider::providers::{BlockchainProvider2, ProviderNodeTypes};
|
||||
use reth_tasks::TaskExecutor;
|
||||
use reth_tokio_util::EventSender;
|
||||
@ -70,7 +70,8 @@ impl EngineNodeLauncher {
|
||||
|
||||
impl<Types, T, CB, AO> LaunchNode<NodeBuilderWithComponents<T, CB, AO>> for EngineNodeLauncher
|
||||
where
|
||||
Types: ProviderNodeTypes + NodeTypesWithEngine + PersistenceNodeTypes,
|
||||
Types:
|
||||
ProviderNodeTypes<Primitives = EthPrimitives> + NodeTypesWithEngine + PersistenceNodeTypes,
|
||||
T: FullNodeTypes<Types = Types, Provider = BlockchainProvider2<Types>>,
|
||||
CB: NodeComponentsBuilder<T>,
|
||||
AO: RethRpcAddOns<NodeAdapter<T, CB::Components>>,
|
||||
|
||||
@ -10,7 +10,7 @@ use reth_exex::{
|
||||
DEFAULT_EXEX_MANAGER_CAPACITY,
|
||||
};
|
||||
use reth_node_api::{FullNodeComponents, NodeTypes};
|
||||
use reth_primitives::Head;
|
||||
use reth_primitives::{EthPrimitives, Head};
|
||||
use reth_provider::CanonStateSubscriptions;
|
||||
use reth_tracing::tracing::{debug, info};
|
||||
use tracing::Instrument;
|
||||
@ -25,7 +25,9 @@ pub struct ExExLauncher<Node: FullNodeComponents> {
|
||||
config_container: WithConfigs<<Node::Types as NodeTypes>::ChainSpec>,
|
||||
}
|
||||
|
||||
impl<Node: FullNodeComponents + Clone> ExExLauncher<Node> {
|
||||
impl<Node: FullNodeComponents<Types: NodeTypes<Primitives = EthPrimitives>> + Clone>
|
||||
ExExLauncher<Node>
|
||||
{
|
||||
/// Create a new `ExExLauncher` with the given extensions.
|
||||
pub const fn new(
|
||||
head: Head,
|
||||
|
||||
@ -18,6 +18,7 @@ use reth_node_core::{
|
||||
version::{CARGO_PKG_VERSION, CLIENT_CODE, NAME_CLIENT, VERGEN_GIT_SHA},
|
||||
};
|
||||
use reth_payload_builder::PayloadStore;
|
||||
use reth_primitives::EthPrimitives;
|
||||
use reth_provider::providers::ProviderNodeTypes;
|
||||
use reth_rpc::{
|
||||
eth::{EthApiTypes, FullEthApiServer},
|
||||
@ -402,7 +403,7 @@ where
|
||||
impl<N, EthApi, EV> RpcAddOns<N, EthApi, EV>
|
||||
where
|
||||
N: FullNodeComponents<
|
||||
Types: ProviderNodeTypes,
|
||||
Types: ProviderNodeTypes<Primitives = EthPrimitives>,
|
||||
PayloadBuilder: PayloadBuilder<PayloadType = <N::Types as NodeTypesWithEngine>::Engine>,
|
||||
>,
|
||||
EthApi: EthApiTypes + FullEthApiServer + AddDevSigners + Unpin + 'static,
|
||||
@ -524,7 +525,7 @@ where
|
||||
impl<N, EthApi, EV> NodeAddOns<N> for RpcAddOns<N, EthApi, EV>
|
||||
where
|
||||
N: FullNodeComponents<
|
||||
Types: ProviderNodeTypes,
|
||||
Types: ProviderNodeTypes<Primitives = EthPrimitives>,
|
||||
PayloadBuilder: PayloadBuilder<PayloadType = <N::Types as NodeTypesWithEngine>::Engine>,
|
||||
>,
|
||||
EthApi: EthApiTypes + FullEthApiServer + AddDevSigners + Unpin + 'static,
|
||||
@ -566,7 +567,9 @@ pub trait EthApiBuilder<N: FullNodeComponents>: 'static {
|
||||
fn build(ctx: &EthApiBuilderCtx<N>) -> Self;
|
||||
}
|
||||
|
||||
impl<N: FullNodeComponents> EthApiBuilder<N> for EthApi<N::Provider, N::Pool, N::Network, N::Evm> {
|
||||
impl<N: FullNodeComponents<Types: NodeTypes<Primitives = EthPrimitives>>> EthApiBuilder<N>
|
||||
for EthApi<N::Provider, N::Pool, N::Network, N::Evm>
|
||||
{
|
||||
fn build(ctx: &EthApiBuilderCtx<N>) -> Self {
|
||||
Self::with_spawner(ctx)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user