Move spawning tasks from thread pools to Service's TaskManager for block importing (#5647)

Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com>
This commit is contained in:
pscottandPierre Krieger authored and GitHub committed 2020-04-29 18:46:39 +02:00
1 parent bb94695a4e
commit 0f401e4699
22 files changed
+124 -107

No files matched your search

@@ -80,11 +80,15 @@ fn build_test_full_node(config: config::NetworkConfiguration)
}
}
let threads_pool = futures::executor::ThreadPool::new().unwrap();
let spawner = |future| threads_pool.spawn_ok(future);
let import_queue = Box::new(sp_consensus::import_queue::BasicQueue::new(
PassThroughVerifier(false),
Box::new(client.clone()),
None,
None,
spawner,
));
let worker = NetworkWorker::new(config::Params {