mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-08 22:14:57 -05:00
feat: add OptimismNode type (#6610)
Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
This commit is contained in:
@@ -10,6 +10,13 @@ pub struct NodeHandle<Node: FullNodeComponents> {
|
||||
pub node_exit_future: NodeExitFuture,
|
||||
}
|
||||
|
||||
impl<Node: FullNodeComponents> NodeHandle<Node> {
|
||||
/// Waits for the node to exit, if it was configured to exit.
|
||||
pub async fn wait_for_node_exit(self) -> eyre::Result<()> {
|
||||
self.node_exit_future.await
|
||||
}
|
||||
}
|
||||
|
||||
impl<Node: FullNodeComponents> fmt::Debug for NodeHandle<Node> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("NodeHandle")
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
use crate::{components::FullNodeComponents, rpc::RethRpcServerHandles};
|
||||
use crate::{
|
||||
components::FullNodeComponents,
|
||||
rpc::{RethRpcServerHandles, RpcRegistry},
|
||||
};
|
||||
use reth_db::database::Database;
|
||||
use reth_network::NetworkHandle;
|
||||
use reth_node_api::{evm::EvmConfig, primitives::NodePrimitives, EngineTypes};
|
||||
@@ -9,11 +12,8 @@ use reth_node_core::{
|
||||
};
|
||||
use reth_payload_builder::PayloadBuilderHandle;
|
||||
use reth_tasks::TaskExecutor;
|
||||
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use crate::rpc::RpcRegistry;
|
||||
|
||||
/// The type that configures stateless node types, the node's primitive types.
|
||||
pub trait NodeTypes: Send + Sync + 'static {
|
||||
/// The node's primitive types.
|
||||
|
||||
Reference in New Issue
Block a user