mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: ChainSpec associated type (#10292)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@ -14,7 +14,7 @@ use reth_chainspec::ChainSpec;
|
||||
use reth_db::{test_utils::TempDatabase, DatabaseEnv};
|
||||
use reth_node_builder::{
|
||||
components::NodeComponentsBuilder, rpc::EthApiBuilderProvider, FullNodeTypesAdapter, Node,
|
||||
NodeAdapter, NodeAddOns, NodeComponents, RethFullAdapter,
|
||||
NodeAdapter, NodeAddOns, NodeComponents, NodeTypes, RethFullAdapter,
|
||||
};
|
||||
use reth_provider::providers::BlockchainProvider;
|
||||
use tracing::{span, Level};
|
||||
@ -50,7 +50,7 @@ pub async fn setup<N>(
|
||||
is_dev: bool,
|
||||
) -> eyre::Result<(Vec<NodeHelperType<N, N::AddOns>>, TaskManager, Wallet)>
|
||||
where
|
||||
N: Default + Node<TmpNodeAdapter<N>>,
|
||||
N: Default + Node<TmpNodeAdapter<N>> + NodeTypes<ChainSpec = ChainSpec>,
|
||||
<<N::ComponentsBuilder as NodeComponentsBuilder<TmpNodeAdapter<N>>>::Components as NodeComponents<TmpNodeAdapter<N>>>::Network: PeersHandleProvider,
|
||||
<N::AddOns as NodeAddOns<Adapter<N>>>::EthApi:
|
||||
FullEthApiServer + AddDevSigners + EthApiBuilderProvider<Adapter<N>>,
|
||||
|
||||
@ -14,6 +14,7 @@ use reth::{
|
||||
types::engine::PayloadStatusEnum,
|
||||
},
|
||||
};
|
||||
use reth_chainspec::ChainSpec;
|
||||
use reth_node_builder::{NodeAddOns, NodeTypes};
|
||||
use reth_primitives::{BlockHash, BlockNumber, Bytes, B256};
|
||||
use reth_stages_types::StageId;
|
||||
@ -45,7 +46,7 @@ where
|
||||
|
||||
impl<Node, AddOns> NodeTestContext<Node, AddOns>
|
||||
where
|
||||
Node: FullNodeComponents,
|
||||
Node: FullNodeComponents<ChainSpec = ChainSpec>,
|
||||
Node::Network: PeersHandleProvider,
|
||||
AddOns: NodeAddOns<Node>,
|
||||
{
|
||||
|
||||
@ -7,6 +7,7 @@ use reth::{
|
||||
DebugApiServer,
|
||||
},
|
||||
};
|
||||
use reth_chainspec::ChainSpec;
|
||||
use reth_primitives::{Bytes, B256};
|
||||
|
||||
#[allow(missing_debug_implementations)]
|
||||
@ -14,7 +15,7 @@ pub struct RpcTestContext<Node: FullNodeComponents, EthApi> {
|
||||
pub inner: RpcRegistry<Node, EthApi>,
|
||||
}
|
||||
|
||||
impl<Node: FullNodeComponents, EthApi> RpcTestContext<Node, EthApi>
|
||||
impl<Node: FullNodeComponents<ChainSpec = ChainSpec>, EthApi> RpcTestContext<Node, EthApi>
|
||||
where
|
||||
EthApi: EthApiSpec + EthTransactions + TraceExt,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user