node: spawn babe and grandpa as blocking tasks (#1292)

* node: spawn babe and grandpa as blocking tasks

* update to latest substrate
This commit is contained in:
André Silva
2020-06-22 18:27:38 +01:00
committed by GitHub
parent ebf7de90c2
commit 6feeabbc7e
3 changed files with 145 additions and 145 deletions
+138 -138
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -358,7 +358,7 @@ macro_rules! new_full {
let (overseer, handler) = real_overseer(leaves, spawner)?;
service.spawn_essential_task("overseer", Box::pin(async move {
service.spawn_essential_task_handle().spawn("overseer", Box::pin(async move {
use futures::{pin_mut, select, FutureExt};
let forward = overseer::forward_events(overseer_client, handler);
@@ -404,7 +404,7 @@ macro_rules! new_full {
};
let babe = babe::start_babe(babe_config)?;
service.spawn_essential_task("babe", babe);
service.spawn_essential_task_handle().spawn_blocking("babe", babe);
}
// if the node isn't actively participating in consensus then it doesn't
@@ -464,7 +464,7 @@ macro_rules! new_full {
shared_voter_state,
};
service.spawn_essential_task(
service.spawn_essential_task_handle().spawn_blocking(
"grandpa-voter",
grandpa::run_grandpa_voter(grandpa_config)?
);
+4 -4
View File
@@ -389,7 +389,7 @@ macro_rules! new_full {
max_block_data_size,
}.build();
service.spawn_essential_task("validation-service", Box::pin(validation_service));
service.spawn_essential_task_handle().spawn("validation-service", Box::pin(validation_service));
handles.validation_service_handle = Some(validation_service_handle.clone());
@@ -436,7 +436,7 @@ macro_rules! new_full {
};
let babe = babe::start_babe(babe_config)?;
service.spawn_essential_task("babe", babe);
service.spawn_essential_task_handle().spawn_blocking("babe", babe);
}
if matches!(role, Role::Authority{..} | Role::Sentry{..}) {
@@ -470,7 +470,7 @@ macro_rules! new_full {
service.prometheus_registry(),
);
service.spawn_task("authority-discovery", authority_discovery);
service.spawn_task_handle().spawn("authority-discovery", authority_discovery);
}
}
@@ -531,7 +531,7 @@ macro_rules! new_full {
shared_voter_state,
};
service.spawn_essential_task(
service.spawn_essential_task_handle().spawn_blocking(
"grandpa-voter",
grandpa::run_grandpa_voter(grandpa_config)?
);