mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 05:51:02 +00:00
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:
Generated
+138
-138
File diff suppressed because it is too large
Load Diff
@@ -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)?
|
||||
);
|
||||
|
||||
@@ -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)?
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user