rpc dependencies relayout
This commit is contained in:
@@ -46,7 +46,7 @@ use v1::impls::{default_gas_price, dispatch_transaction, error_codes};
|
||||
use serde;
|
||||
|
||||
/// Eth rpc implementation.
|
||||
pub struct EthClient<C, S, M, EM> where
|
||||
pub struct EthClient<C, S: ?Sized, M, EM> where
|
||||
C: MiningBlockChainClient,
|
||||
S: SyncProvider,
|
||||
M: MinerService,
|
||||
@@ -61,7 +61,7 @@ pub struct EthClient<C, S, M, EM> where
|
||||
allow_pending_receipt_query: bool,
|
||||
}
|
||||
|
||||
impl<C, S, M, EM> EthClient<C, S, M, EM> where
|
||||
impl<C, S: ?Sized, M, EM> EthClient<C, S, M, EM> where
|
||||
C: MiningBlockChainClient,
|
||||
S: SyncProvider,
|
||||
M: MinerService,
|
||||
@@ -242,7 +242,7 @@ fn no_author_err() -> Error {
|
||||
}
|
||||
}
|
||||
|
||||
impl<C, S, M, EM> EthClient<C, S, M, EM> where
|
||||
impl<C, S: ?Sized, M, EM> EthClient<C, S, M, EM> where
|
||||
C: MiningBlockChainClient + 'static,
|
||||
S: SyncProvider + 'static,
|
||||
M: MinerService + 'static,
|
||||
@@ -255,7 +255,7 @@ impl<C, S, M, EM> EthClient<C, S, M, EM> where
|
||||
}
|
||||
}
|
||||
|
||||
impl<C, S, M, EM> Eth for EthClient<C, S, M, EM> where
|
||||
impl<C, S: ?Sized, M, EM> Eth for EthClient<C, S, M, EM> where
|
||||
C: MiningBlockChainClient + 'static,
|
||||
S: SyncProvider + 'static,
|
||||
M: MinerService + 'static,
|
||||
|
||||
@@ -21,11 +21,11 @@ use ethsync::SyncProvider;
|
||||
use v1::traits::Net;
|
||||
|
||||
/// Net rpc implementation.
|
||||
pub struct NetClient<S> where S: SyncProvider {
|
||||
pub struct NetClient<S: ?Sized> where S: SyncProvider {
|
||||
sync: Weak<S>
|
||||
}
|
||||
|
||||
impl<S> NetClient<S> where S: SyncProvider {
|
||||
impl<S: ?Sized> NetClient<S> where S: SyncProvider {
|
||||
/// Creates new NetClient.
|
||||
pub fn new(sync: &Arc<S>) -> Self {
|
||||
NetClient {
|
||||
@@ -34,7 +34,7 @@ impl<S> NetClient<S> where S: SyncProvider {
|
||||
}
|
||||
}
|
||||
|
||||
impl<S> Net for NetClient<S> where S: SyncProvider + 'static {
|
||||
impl<S: ?Sized> Net for NetClient<S> where S: SyncProvider + 'static {
|
||||
fn version(&self, _: Params) -> Result<Value, Error> {
|
||||
Ok(Value::String(format!("{}", take_weak!(self.sync).status().network_id).to_owned()))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user