mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: remove redundant phantom (#11134)
This commit is contained in:
@ -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>,
|
||||
}
|
||||
|
||||
@ -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(),
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user