mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-30 03:01:58 -04:00
chore: move nodetypes to node-api (#7268)
This commit is contained in:
@@ -8,7 +8,7 @@ use crate::{
|
||||
NodeComponentsBuilder, PoolBuilder,
|
||||
},
|
||||
hooks::NodeHooks,
|
||||
node::{FullNode, FullNodeTypes, FullNodeTypesAdapter, NodeTypes},
|
||||
node::{FullNode, FullNodeTypes, FullNodeTypesAdapter},
|
||||
rpc::{RethRpcServerHandles, RpcContext, RpcHooks},
|
||||
Node, NodeHandle,
|
||||
};
|
||||
@@ -28,6 +28,7 @@ use reth_db::{
|
||||
};
|
||||
use reth_interfaces::p2p::either::EitherDownloader;
|
||||
use reth_network::{NetworkBuilder, NetworkConfig, NetworkEvents, NetworkHandle};
|
||||
use reth_node_api::NodeTypes;
|
||||
use reth_node_core::{
|
||||
cli::config::{PayloadBuilderConfig, RethRpcConfig, RethTransactionPoolConfig},
|
||||
dirs::{ChainPath, DataDirPath, MaybePlatformPath},
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
//! Traits for the builder
|
||||
|
||||
use crate::{
|
||||
components::NodeComponents,
|
||||
node::{FullNodeTypes, NodeTypes},
|
||||
BuilderContext,
|
||||
};
|
||||
use crate::{components::NodeComponents, node::FullNodeTypes, BuilderContext};
|
||||
use reth_network::NetworkHandle;
|
||||
use reth_node_api::NodeTypes;
|
||||
use reth_payload_builder::PayloadBuilderHandle;
|
||||
use reth_tasks::TaskExecutor;
|
||||
use reth_transaction_pool::TransactionPool;
|
||||
|
||||
@@ -34,3 +34,6 @@ pub use reth_node_core::cli::config::{
|
||||
|
||||
// re-export the core config for convenience
|
||||
pub use reth_node_core::node_config::NodeConfig;
|
||||
|
||||
// re-export API types for convenience
|
||||
pub use reth_node_api::*;
|
||||
|
||||
@@ -5,7 +5,7 @@ use crate::{
|
||||
};
|
||||
use reth_db::database::Database;
|
||||
use reth_network::NetworkHandle;
|
||||
use reth_node_api::{evm::ConfigureEvm, primitives::NodePrimitives, EngineTypes};
|
||||
pub use reth_node_api::NodeTypes;
|
||||
use reth_node_core::{
|
||||
dirs::{ChainPath, DataDirPath},
|
||||
node_config::NodeConfig,
|
||||
@@ -34,19 +34,6 @@ pub trait Node<N>: NodeTypes + Clone {
|
||||
) -> ComponentsBuilder<N, Self::PoolBuilder, Self::PayloadBuilder, Self::NetworkBuilder>;
|
||||
}
|
||||
|
||||
/// The type that configures stateless node types, the node's primitive types.
|
||||
pub trait NodeTypes: Send + Sync + 'static {
|
||||
/// The node's primitive types, defining basic operations and structures.
|
||||
type Primitives: NodePrimitives;
|
||||
/// The node's engine types, defining the interaction with the consensus engine.
|
||||
type Engine: EngineTypes;
|
||||
/// The node's EVM configuration, defining settings for the Ethereum Virtual Machine.
|
||||
type Evm: ConfigureEvm;
|
||||
|
||||
/// Returns the node's evm config.
|
||||
fn evm_config(&self) -> Self::Evm;
|
||||
}
|
||||
|
||||
/// A helper type that is downstream of the node types and adds stateful components to the node.
|
||||
pub trait FullNodeTypes: NodeTypes + 'static {
|
||||
/// Underlying database type.
|
||||
|
||||
Reference in New Issue
Block a user