Use SpawnTaskHandles for spawning tasks in the tx pool (#8958)

* Remove futures-diagnose

* Use `SpawnTaskHandle`s for spawning tasks in the tx pool

* Box the spawner

* Fix tests

* Use the testing task executor
This commit is contained in:
Ashley
2021-06-01 16:28:03 +02:00
committed by GitHub
parent ac3c88fd34
commit 84e402389b
5 changed files with 12 additions and 31 deletions
@@ -35,6 +35,7 @@ use std::collections::BTreeSet;
use sc_client_api::client::BlockchainEvents;
use sc_block_builder::BlockBuilderProvider;
use sp_consensus::BlockOrigin;
use sp_core::testing::TaskExecutor;
fn pool() -> Pool<TestApi> {
Pool::new(Default::default(), true.into(), TestApi::with_alice_nonce(209).into())
@@ -935,7 +936,7 @@ fn should_not_accept_old_signatures() {
let client = Arc::new(substrate_test_runtime_client::new());
let pool = Arc::new(
BasicPool::new_test(Arc::new(FullChainApi::new(client, None))).0
BasicPool::new_test(Arc::new(FullChainApi::new(client, None, TaskExecutor::new()))).0
);
let transfer = Transfer {
@@ -971,7 +972,7 @@ fn import_notification_to_pool_maintain_works() {
let mut client = Arc::new(substrate_test_runtime_client::new());
let pool = Arc::new(
BasicPool::new_test(Arc::new(FullChainApi::new(client.clone(), None))).0
BasicPool::new_test(Arc::new(FullChainApi::new(client.clone(), None, TaskExecutor::new()))).0
);
// Prepare the extrisic, push it to the pool and check that it was added.