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:
pscott
2020-04-29 18:46:39 +02:00
committed by GitHub
parent bb94695a4e
commit 0f401e4699
22 changed files with 124 additions and 107 deletions
@@ -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 {