chore: remove redundant phantom (#11134)

This commit is contained in:
Matthias Seitz
2024-09-23 19:36:48 +02:00
committed by GitHub
parent fc12639b9b
commit b29ff1f6cc
2 changed files with 3 additions and 7 deletions

View File

@ -1,7 +1,5 @@
//! Node add-ons. Depend on core [`NodeComponents`](crate::NodeComponents).
use std::marker::PhantomData;
use reth_node_api::{EthApiTypes, FullNodeComponents, NodeAddOns};
use crate::{exex::BoxedLaunchExEx, hooks::NodeHooks, rpc::RpcHooks};
@ -22,8 +20,6 @@ pub struct AddOns<Node: FullNodeComponents, AddOns: NodeAddOns<Node>> {
/// required for launching the node, such as RPC.
#[derive(Default)]
pub struct RpcAddOns<Node: FullNodeComponents, EthApi: EthApiTypes> {
/// Core `eth` API type to install on the RPC server, configured w.r.t. network.
pub _eth_api: PhantomData<EthApi>,
/// Additional RPC hooks.
pub hooks: RpcHooks<Node, EthApi>,
}

View File

@ -5,7 +5,7 @@
//! The node builder process is essentially a state machine that transitions through various states
//! before the node can be launched.
use std::{fmt, future::Future, marker::PhantomData};
use std::{fmt, future::Future};
use reth_exex::ExExContext;
use reth_node_api::{
@ -56,7 +56,7 @@ impl<T: FullNodeTypes> NodeBuilderWithTypes<T> {
components_builder,
add_ons: AddOns {
hooks: NodeHooks::default(),
rpc: RpcAddOns { _eth_api: PhantomData::<()>, hooks: RpcHooks::default() },
rpc: RpcAddOns { hooks: RpcHooks::default() },
exexs: Vec::new(),
},
}
@ -180,7 +180,7 @@ where
components_builder,
add_ons: AddOns {
hooks: NodeHooks::default(),
rpc: RpcAddOns { _eth_api: PhantomData::<AO::EthApi>, hooks: RpcHooks::default() },
rpc: RpcAddOns { hooks: RpcHooks::default() },
exexs: Vec::new(),
},
}