Switch the client to new futures (#3103)

* Switch the client to new futures

* No need for compat in the client

* Fix client tests

* Address review
This commit is contained in:
Pierre Krieger
2019-07-11 16:58:30 +02:00
committed by Bastian Köcher
parent f5e921281e
commit bf2551a854
28 changed files with 249 additions and 112 deletions
+6 -6
View File
@@ -32,7 +32,7 @@ pub use state_machine::ExecutionStrategy;
use std::sync::Arc;
use std::collections::HashMap;
use futures::future::FutureResult;
use futures::future::Ready;
use hash_db::Hasher;
use primitives::storage::well_known_keys;
use runtime_primitives::traits::{
@@ -220,11 +220,11 @@ impl<E, Backend, G: GenesisInit> TestClientBuilder<
}
impl<Block: BlockT> client::light::fetcher::Fetcher<Block> for LightFetcher {
type RemoteHeaderResult = FutureResult<Block::Header, client::error::Error>;
type RemoteReadResult = FutureResult<Option<Vec<u8>>, client::error::Error>;
type RemoteCallResult = FutureResult<Vec<u8>, client::error::Error>;
type RemoteChangesResult = FutureResult<Vec<(NumberFor<Block>, u32)>, client::error::Error>;
type RemoteBodyResult = FutureResult<Vec<Block::Extrinsic>, client::error::Error>;
type RemoteHeaderResult = Ready<Result<Block::Header, client::error::Error>>;
type RemoteReadResult = Ready<Result<Option<Vec<u8>>, client::error::Error>>;
type RemoteCallResult = Ready<Result<Vec<u8>, client::error::Error>>;
type RemoteChangesResult = Ready<Result<Vec<(NumberFor<Block>, u32)>, client::error::Error>>;
type RemoteBodyResult = Ready<Result<Vec<Block::Extrinsic>, client::error::Error>>;
fn remote_header(
&self,