diff --git a/client/src/client.rs b/client/src/client.rs index 93ed219..aafecdb 100644 --- a/client/src/client.rs +++ b/client/src/client.rs @@ -213,7 +213,7 @@ impl ClientBuilder { } pub struct Client { - node: Node, + node: Arc>>, #[cfg(not(target_arch = "wasm32"))] rpc: Option>, db: DB, diff --git a/client/src/rpc.rs b/client/src/rpc.rs index 350dfca..513d7aa 100644 --- a/client/src/rpc.rs +++ b/client/src/rpc.rs @@ -23,13 +23,13 @@ use common::{ use execution::types::{CallOpts, ExecutionBlock}; pub struct Rpc { - node: Node, + node: Arc>>, handle: Option, port: u16, } impl Rpc { - pub fn new(node: Node, port: u16) -> Self { + pub fn new(node: Arc>>, port: u16) -> Self { Rpc { node, handle: None, @@ -126,7 +126,7 @@ trait NetRpc { } struct RpcInner { - node: Node, + node: Arc>>, port: u16, }