Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(node): derive Clone for FullNode #9046

Merged
merged 1 commit into from
Jun 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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(),
}
}
}
Loading