Name all the tasks! (#6726)

* Remove any implementation of `Spawn` or `Executor` from our task executors

* Fix compilation

* Rename `SpawnBlockingExecutor`

* Update primitives/core/src/traits.rs

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* Fix tests

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
Bastian Köcher
2020-07-26 14:56:17 +02:00
committed by GitHub
parent 2ec131142b
commit 9310f15ac2
43 changed files with 280 additions and 280 deletions
+8 -3
View File
@@ -23,7 +23,7 @@ pub mod client_ext;
pub use sc_client_api::{
execution_extensions::{ExecutionStrategies, ExecutionExtensions},
ForkBlocks, BadBlocks, CloneableSpawn,
ForkBlocks, BadBlocks,
};
pub use sc_client_db::{Backend, self};
pub use sp_consensus;
@@ -33,7 +33,7 @@ pub use sp_keyring::{
ed25519::Keyring as Ed25519Keyring,
sr25519::Keyring as Sr25519Keyring,
};
pub use sp_core::{traits::BareCryptoStorePtr, tasks::executor as tasks_executor};
pub use sp_core::traits::BareCryptoStorePtr;
pub use sp_runtime::{Storage, StorageChild};
pub use sp_state_machine::ExecutionStrategy;
pub use sc_service::{RpcHandlers, RpcSession, client};
@@ -254,7 +254,12 @@ impl<Block: BlockT, E, Backend, G: GenesisInit> TestClientBuilder<
let executor = executor.into().unwrap_or_else(||
NativeExecutor::new(WasmExecutionMethod::Interpreted, None, 8)
);
let executor = LocalCallExecutor::new(self.backend.clone(), executor, tasks_executor(), Default::default());
let executor = LocalCallExecutor::new(
self.backend.clone(),
executor,
Box::new(sp_core::testing::TaskExecutor::new()),
Default::default(),
);
self.build_with_executor(executor)
}