Skip to content

Commit

Permalink
feat(node): derive Clone for FullNode (#9046)
Browse files Browse the repository at this point in the history
  • Loading branch information
tcoratger committed Jun 24, 2024
1 parent 31e2470 commit bd0f676
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions crates/node/builder/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub trait Node<N: FullNodeTypes>: NodeTypes + Clone {
/// The launched node with all components including RPC handlers.
///
/// This can be used to interact with the launched node.
#[derive(Debug)]
#[derive(Debug, Clone)]
pub struct FullNode<Node: FullNodeComponents> {
/// The evm configuration.
pub evm_config: Node::Evm,
Expand Down Expand Up @@ -95,21 +95,3 @@ impl<Node: FullNodeComponents> FullNode<Node> {
self.auth_server_handle().ipc_client().await
}
}

impl<Node: FullNodeComponents> Clone for FullNode<Node> {
fn clone(&self) -> Self {
Self {
evm_config: self.evm_config.clone(),
block_executor: self.block_executor.clone(),
pool: self.pool.clone(),
network: self.network.clone(),
provider: self.provider.clone(),
payload_builder: self.payload_builder.clone(),
task_executor: self.task_executor.clone(),
rpc_server_handles: self.rpc_server_handles.clone(),
rpc_registry: self.rpc_registry.clone(),
config: self.config.clone(),
data_dir: self.data_dir.clone(),
}
}
}

0 comments on commit bd0f676

Please sign in to comment.