fix compile warnings (#10993)
* fix warnings * fix: failing build, use `spec` as dev-dependency
This commit is contained in:
committed by
Andronik Ordian
parent
505e284932
commit
dab2a6bd4b
@@ -113,7 +113,7 @@ pub struct EthClient<C, SN: ?Sized, S: ?Sized, M, EM> where
|
||||
client: Arc<C>,
|
||||
snapshot: Arc<SN>,
|
||||
sync: Arc<S>,
|
||||
accounts: Arc<Fn() -> Vec<Address> + Send + Sync>,
|
||||
accounts: Arc<dyn Fn() -> Vec<Address> + Send + Sync>,
|
||||
miner: Arc<M>,
|
||||
external_miner: Arc<EM>,
|
||||
seed_compute: Mutex<SeedHashCompute>,
|
||||
@@ -193,7 +193,7 @@ impl<C, SN: ?Sized, S: ?Sized, M, EM, T: StateInfo + 'static> EthClient<C, SN, S
|
||||
client: &Arc<C>,
|
||||
snapshot: &Arc<SN>,
|
||||
sync: &Arc<S>,
|
||||
accounts: &Arc<Fn() -> Vec<Address> + Send + Sync>,
|
||||
accounts: &Arc<dyn Fn() -> Vec<Address> + Send + Sync>,
|
||||
miner: &Arc<M>,
|
||||
em: &Arc<EM>,
|
||||
options: EthClientOptions
|
||||
@@ -449,8 +449,8 @@ impl<C, SN: ?Sized, S: ?Sized, M, EM, T: StateInfo + 'static> EthClient<C, SN, S
|
||||
|
||||
self.miner
|
||||
.pending_state(info.best_block_number)
|
||||
.map(|s| Box::new(s) as Box<StateInfo>)
|
||||
.unwrap_or(Box::new(self.client.latest_state()) as Box<StateInfo>)
|
||||
.map(|s| Box::new(s) as Box<dyn StateInfo>)
|
||||
.unwrap_or(Box::new(self.client.latest_state()) as Box<dyn StateInfo>)
|
||||
.into()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ where
|
||||
{
|
||||
/// Creates a new `EthPubSubClient` for `LightClient`.
|
||||
pub fn light(
|
||||
client: Arc<LightChainClient>,
|
||||
client: Arc<dyn LightChainClient>,
|
||||
on_demand: Arc<OD>,
|
||||
sync: Arc<S>,
|
||||
cache: Arc<Mutex<Cache>>,
|
||||
|
||||
@@ -58,7 +58,7 @@ pub struct EthClient<C, S: LightSyncProvider + LightNetworkDispatcher + 'static,
|
||||
client: Arc<C>,
|
||||
on_demand: Arc<OD>,
|
||||
transaction_queue: Arc<RwLock<TransactionQueue>>,
|
||||
accounts: Arc<Fn() -> Vec<Address> + Send + Sync>,
|
||||
accounts: Arc<dyn Fn() -> Vec<Address> + Send + Sync>,
|
||||
cache: Arc<Mutex<LightDataCache>>,
|
||||
polls: Mutex<PollManager<SyncPollFilter>>,
|
||||
poll_lifetime: u32,
|
||||
@@ -101,7 +101,7 @@ where
|
||||
client: Arc<C>,
|
||||
on_demand: Arc<OD>,
|
||||
transaction_queue: Arc<RwLock<TransactionQueue>>,
|
||||
accounts: Arc<Fn() -> Vec<Address> + Send + Sync>,
|
||||
accounts: Arc<dyn Fn() -> Vec<Address> + Send + Sync>,
|
||||
cache: Arc<Mutex<LightDataCache>>,
|
||||
gas_price_percentile: usize,
|
||||
poll_lifetime: u32
|
||||
|
||||
@@ -34,14 +34,14 @@ use v1::types::{Bytes, ReleaseInfo, Transaction};
|
||||
|
||||
/// Parity-specific rpc interface for operations altering the settings.
|
||||
pub struct ParitySetClient<F> {
|
||||
client: Arc<LightChainClient>,
|
||||
net: Arc<ManageNetwork>,
|
||||
client: Arc<dyn LightChainClient>,
|
||||
net: Arc<dyn ManageNetwork>,
|
||||
fetch: F,
|
||||
}
|
||||
|
||||
impl<F: Fetch> ParitySetClient<F> {
|
||||
/// Creates new `ParitySetClient` with given `Fetch`.
|
||||
pub fn new(client: Arc<LightChainClient>, net: Arc<ManageNetwork>, fetch: F) -> Self {
|
||||
pub fn new(client: Arc<dyn LightChainClient>, net: Arc<dyn ManageNetwork>, fetch: F) -> Self {
|
||||
ParitySetClient {
|
||||
client,
|
||||
net,
|
||||
|
||||
@@ -59,13 +59,13 @@ pub struct ParityClient<C, M, U> {
|
||||
client: Arc<C>,
|
||||
miner: Arc<M>,
|
||||
updater: Arc<U>,
|
||||
sync: Arc<SyncProvider>,
|
||||
net: Arc<ManageNetwork>,
|
||||
sync: Arc<dyn SyncProvider>,
|
||||
net: Arc<dyn ManageNetwork>,
|
||||
logger: Arc<RotatingLogger>,
|
||||
settings: Arc<NetworkSettings>,
|
||||
signer: Option<Arc<SignerService>>,
|
||||
ws_address: Option<Host>,
|
||||
snapshot: Option<Arc<SnapshotService>>,
|
||||
snapshot: Option<Arc<dyn SnapshotService>>,
|
||||
}
|
||||
|
||||
impl<C, M, U> ParityClient<C, M, U> where
|
||||
@@ -75,14 +75,14 @@ impl<C, M, U> ParityClient<C, M, U> where
|
||||
pub fn new(
|
||||
client: Arc<C>,
|
||||
miner: Arc<M>,
|
||||
sync: Arc<SyncProvider>,
|
||||
sync: Arc<dyn SyncProvider>,
|
||||
updater: Arc<U>,
|
||||
net: Arc<ManageNetwork>,
|
||||
net: Arc<dyn ManageNetwork>,
|
||||
logger: Arc<RotatingLogger>,
|
||||
settings: Arc<NetworkSettings>,
|
||||
signer: Option<Arc<SignerService>>,
|
||||
ws_address: Option<Host>,
|
||||
snapshot: Option<Arc<SnapshotService>>,
|
||||
snapshot: Option<Arc<dyn SnapshotService>>,
|
||||
) -> Self {
|
||||
ParityClient {
|
||||
client,
|
||||
|
||||
@@ -87,7 +87,7 @@ pub struct ParitySetClient<C, M, U, F = fetch::Client> {
|
||||
client: Arc<C>,
|
||||
miner: Arc<M>,
|
||||
updater: Arc<U>,
|
||||
net: Arc<ManageNetwork>,
|
||||
net: Arc<dyn ManageNetwork>,
|
||||
fetch: F,
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ impl<C, M, U, F> ParitySetClient<C, M, U, F>
|
||||
client: &Arc<C>,
|
||||
miner: &Arc<M>,
|
||||
updater: &Arc<U>,
|
||||
net: &Arc<ManageNetwork>,
|
||||
net: &Arc<dyn ManageNetwork>,
|
||||
fetch: F,
|
||||
) -> Self {
|
||||
ParitySetClient {
|
||||
|
||||
@@ -40,7 +40,7 @@ use v1::types::{TransactionModification, ConfirmationRequest, ConfirmationRespon
|
||||
/// Transactions confirmation (personal) rpc implementation.
|
||||
pub struct SignerClient<D: Dispatcher> {
|
||||
signer: Arc<SignerService>,
|
||||
accounts: Arc<dispatch::Accounts>,
|
||||
accounts: Arc<dyn dispatch::Accounts>,
|
||||
dispatcher: D,
|
||||
subscribers: Arc<Mutex<Subscribers<Sink<Vec<ConfirmationRequest>>>>>,
|
||||
deprecation_notice: DeprecationNotice,
|
||||
@@ -49,7 +49,7 @@ pub struct SignerClient<D: Dispatcher> {
|
||||
impl<D: Dispatcher + 'static> SignerClient<D> {
|
||||
/// Create new instance of signer client.
|
||||
pub fn new(
|
||||
accounts: Arc<dispatch::Accounts>,
|
||||
accounts: Arc<dyn dispatch::Accounts>,
|
||||
dispatcher: D,
|
||||
signer: &Arc<SignerService>,
|
||||
executor: Executor,
|
||||
@@ -81,7 +81,7 @@ impl<D: Dispatcher + 'static> SignerClient<D> {
|
||||
}
|
||||
|
||||
fn confirm_internal<F, T>(&self, id: U256, modification: TransactionModification, f: F) -> BoxFuture<WithToken<ConfirmationResponse>> where
|
||||
F: FnOnce(D, &Arc<dispatch::Accounts>, ConfirmationPayload) -> T,
|
||||
F: FnOnce(D, &Arc<dyn dispatch::Accounts>, ConfirmationPayload) -> T,
|
||||
T: IntoFuture<Item=WithToken<ConfirmationResponse>, Error=Error>,
|
||||
T::Future: Send + 'static
|
||||
{
|
||||
|
||||
@@ -91,7 +91,7 @@ fn schedule(executor: Executor,
|
||||
/// Implementation of functions that require signing when no trusted signer is used.
|
||||
pub struct SigningQueueClient<D> {
|
||||
signer: Arc<SignerService>,
|
||||
accounts: Arc<dispatch::Accounts>,
|
||||
accounts: Arc<dyn dispatch::Accounts>,
|
||||
dispatcher: D,
|
||||
executor: Executor,
|
||||
// None here means that the request hasn't yet been confirmed
|
||||
@@ -101,7 +101,7 @@ pub struct SigningQueueClient<D> {
|
||||
|
||||
impl<D: Dispatcher + 'static> SigningQueueClient<D> {
|
||||
/// Creates a new signing queue client given shared signing queue.
|
||||
pub fn new(signer: &Arc<SignerService>, dispatcher: D, executor: Executor, accounts: &Arc<dispatch::Accounts>) -> Self {
|
||||
pub fn new(signer: &Arc<SignerService>, dispatcher: D, executor: Executor, accounts: &Arc<dyn dispatch::Accounts>) -> Self {
|
||||
SigningQueueClient {
|
||||
signer: signer.clone(),
|
||||
accounts: accounts.clone(),
|
||||
|
||||
@@ -37,14 +37,14 @@ use v1::types::{
|
||||
|
||||
/// Implementation of functions that require signing when no trusted signer is used.
|
||||
pub struct SigningUnsafeClient<D> {
|
||||
accounts: Arc<dispatch::Accounts>,
|
||||
accounts: Arc<dyn dispatch::Accounts>,
|
||||
dispatcher: D,
|
||||
deprecation_notice: DeprecationNotice,
|
||||
}
|
||||
|
||||
impl<D: Dispatcher + 'static> SigningUnsafeClient<D> {
|
||||
/// Creates new SigningUnsafeClient.
|
||||
pub fn new(accounts: &Arc<dispatch::Accounts>, dispatcher: D) -> Self {
|
||||
pub fn new(accounts: &Arc<dyn dispatch::Accounts>, dispatcher: D) -> Self {
|
||||
SigningUnsafeClient {
|
||||
accounts: accounts.clone(),
|
||||
dispatcher,
|
||||
|
||||
Reference in New Issue
Block a user