Ensure we spawn the block import worker as an essential task (#8155)

* Ensure we spawn the block import worker as an essential task

This pr ensures that we spawn the block import worker as an essential
task. This is quite important as we need to bring down the node when the
block import is done. Besides that it adds some debug output to the
block import worker.

* Don't be stupid :D
This commit is contained in:
Bastian Köcher authored and GitHub committed 2021-02-19 16:31:03 +00:00
1 parent 16a27c28a9
commit 821e018d75
10 files changed
+75 -13

No files matched your search

@@ -73,7 +73,7 @@ pub fn new_partial(config: &Configuration) -> Result<sc_service::PartialComponen
Some(Box::new(grandpa_block_import.clone())),
client.clone(),
inherent_data_providers.clone(),
&task_manager.spawn_handle(),
&task_manager.spawn_essential_handle(),
config.prometheus_registry(),
sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()),
)?;
@@ -295,7 +295,7 @@ pub fn new_light(mut config: Configuration) -> Result<TaskManager, ServiceError>
Some(Box::new(grandpa_block_import)),
client.clone(),
InherentDataProviders::new(),
&task_manager.spawn_handle(),
&task_manager.spawn_essential_handle(),
config.prometheus_registry(),
sp_consensus::NeverCanAuthor,
)?;