mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: NodeTypesWithDB (#10683)
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
use reth_chainspec::ChainSpec;
|
||||
use reth_evm::ConfigureEvm;
|
||||
use reth_node_api::FullNodeComponents;
|
||||
use reth_node_api::{FullNodeComponents, NodeTypes};
|
||||
use reth_primitives::{
|
||||
revm_primitives::{BlockEnv, OptimismFields, TxEnv},
|
||||
Bytes, TxKind, U256,
|
||||
@ -16,7 +17,7 @@ use crate::{OpEthApi, OpEthApiError};
|
||||
impl<N> EthCall for OpEthApi<N>
|
||||
where
|
||||
Self: Call,
|
||||
N: FullNodeComponents,
|
||||
N: FullNodeComponents<Types: NodeTypes<ChainSpec = ChainSpec>>,
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ use op_alloy_network::AnyNetwork;
|
||||
use reth_chainspec::ChainSpec;
|
||||
use reth_evm::ConfigureEvm;
|
||||
use reth_network_api::NetworkInfo;
|
||||
use reth_node_api::{BuilderProvider, FullNodeComponents, FullNodeTypes};
|
||||
use reth_node_api::{BuilderProvider, FullNodeComponents, FullNodeTypes, NodeTypes};
|
||||
use reth_node_builder::EthApiBuilderCtx;
|
||||
use reth_provider::{
|
||||
BlockIdReader, BlockNumReader, BlockReaderIdExt, ChainSpecProvider, HeaderProvider,
|
||||
@ -101,7 +101,7 @@ where
|
||||
impl<N> EthApiSpec for OpEthApi<N>
|
||||
where
|
||||
Self: Send + Sync,
|
||||
N: FullNodeComponents,
|
||||
N: FullNodeComponents<Types: NodeTypes<ChainSpec = ChainSpec>>,
|
||||
{
|
||||
#[inline]
|
||||
fn provider(
|
||||
@ -151,7 +151,7 @@ where
|
||||
impl<N> LoadFee for OpEthApi<N>
|
||||
where
|
||||
Self: LoadBlock,
|
||||
N: FullNodeComponents,
|
||||
N: FullNodeComponents<Types: NodeTypes<ChainSpec = ChainSpec>>,
|
||||
{
|
||||
#[inline]
|
||||
fn provider(
|
||||
@ -179,7 +179,7 @@ where
|
||||
impl<N> LoadState for OpEthApi<N>
|
||||
where
|
||||
Self: Send + Sync,
|
||||
N: FullNodeComponents,
|
||||
N: FullNodeComponents<Types: NodeTypes<ChainSpec = ChainSpec>>,
|
||||
{
|
||||
#[inline]
|
||||
fn provider(&self) -> impl StateProviderFactory + ChainSpecProvider<ChainSpec = ChainSpec> {
|
||||
@ -226,7 +226,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<N: FullNodeComponents> AddDevSigners for OpEthApi<N> {
|
||||
impl<N: FullNodeComponents<Types: NodeTypes<ChainSpec = ChainSpec>>> AddDevSigners for OpEthApi<N> {
|
||||
fn with_dev_accounts(&self) {
|
||||
*self.signers().write() = DevSigner::random_signers(20)
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
use reth_chainspec::ChainSpec;
|
||||
use reth_evm::ConfigureEvm;
|
||||
use reth_node_api::FullNodeComponents;
|
||||
use reth_node_api::{FullNodeComponents, NodeTypes};
|
||||
use reth_primitives::{
|
||||
revm_primitives::BlockEnv, BlockNumber, Receipt, SealedBlockWithSenders, B256,
|
||||
};
|
||||
@ -22,7 +22,7 @@ use crate::OpEthApi;
|
||||
impl<N> LoadPendingBlock for OpEthApi<N>
|
||||
where
|
||||
Self: SpawnBlocking,
|
||||
N: FullNodeComponents,
|
||||
N: FullNodeComponents<Types: NodeTypes<ChainSpec = ChainSpec>>,
|
||||
{
|
||||
#[inline]
|
||||
fn provider(
|
||||
|
||||
Reference in New Issue
Block a user