mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 02:49:55 +00:00
refactor: Remove unnecessary deps
This commit is contained in:
@ -9,7 +9,7 @@ use reth::{
|
|||||||
primitives::EthereumHardforks,
|
primitives::EthereumHardforks,
|
||||||
providers::ChainSpecProvider,
|
providers::ChainSpecProvider,
|
||||||
rpc::{
|
rpc::{
|
||||||
eth::{DevSigner, FullEthApiServer},
|
eth::{core::EthApiInner, DevSigner, FullEthApiServer},
|
||||||
server_types::eth::{EthApiError, EthStateCache, FeeHistoryCache, GasPriceOracle},
|
server_types::eth::{EthApiError, EthStateCache, FeeHistoryCache, GasPriceOracle},
|
||||||
},
|
},
|
||||||
tasks::{
|
tasks::{
|
||||||
@ -34,8 +34,6 @@ use reth_rpc_eth_api::{
|
|||||||
};
|
};
|
||||||
use std::{fmt, sync::Arc};
|
use std::{fmt, sync::Arc};
|
||||||
|
|
||||||
use reth_optimism_rpc::eth::EthApiNodeBackend;
|
|
||||||
|
|
||||||
mod block;
|
mod block;
|
||||||
mod call;
|
mod call;
|
||||||
pub mod engine_api;
|
pub mod engine_api;
|
||||||
@ -45,6 +43,14 @@ mod transaction;
|
|||||||
pub trait HlNodeCore: RpcNodeCore<Provider: BlockReader> {}
|
pub trait HlNodeCore: RpcNodeCore<Provider: BlockReader> {}
|
||||||
impl<T> HlNodeCore for T where T: RpcNodeCore<Provider: BlockReader> {}
|
impl<T> HlNodeCore for T where T: RpcNodeCore<Provider: BlockReader> {}
|
||||||
|
|
||||||
|
/// Adapter for [`EthApiInner`], which holds all the data required to serve core `eth_` API.
|
||||||
|
pub type EthApiNodeBackend<N> = EthApiInner<
|
||||||
|
<N as RpcNodeCore>::Provider,
|
||||||
|
<N as RpcNodeCore>::Pool,
|
||||||
|
<N as RpcNodeCore>::Network,
|
||||||
|
<N as RpcNodeCore>::Evm,
|
||||||
|
>;
|
||||||
|
|
||||||
/// Container type `HlEthApi`
|
/// Container type `HlEthApi`
|
||||||
#[allow(missing_debug_implementations)]
|
#[allow(missing_debug_implementations)]
|
||||||
pub(crate) struct HlEthApiInner<N: HlNodeCore> {
|
pub(crate) struct HlEthApiInner<N: HlNodeCore> {
|
||||||
@ -58,6 +64,8 @@ pub struct HlEthApi<N: HlNodeCore> {
|
|||||||
pub(crate) inner: Arc<HlEthApiInner<N>>,
|
pub(crate) inner: Arc<HlEthApiInner<N>>,
|
||||||
/// Converter for RPC types.
|
/// Converter for RPC types.
|
||||||
tx_resp_builder: RpcConverter<Ethereum, N::Evm, EthApiError, ()>,
|
tx_resp_builder: RpcConverter<Ethereum, N::Evm, EthApiError, ()>,
|
||||||
|
/// Whether the node is in HL node compliant mode.
|
||||||
|
pub(crate) hl_node_compliant: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<N: HlNodeCore> fmt::Debug for HlEthApi<N> {
|
impl<N: HlNodeCore> fmt::Debug for HlEthApi<N> {
|
||||||
|
|||||||
Reference in New Issue
Block a user