mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 19:21:13 +00:00
node: spawn grandpa voter as essential task (#3899)
* node: spawn grandpa voter as essential task * node: stop babe authoring task on exit * node: remove unnecessary future boxing * Apply suggestions from code review
This commit is contained in:
committed by
Bastian Köcher
parent
40a1f06419
commit
62a238a81b
@@ -115,11 +115,11 @@ pub fn new_full<C: Send + Default + 'static>(config: Configuration<C, GenesisCon
|
||||
service.keystore(),
|
||||
)?;
|
||||
|
||||
let select = aura.select(service.on_exit()).then(|_| Ok(()));
|
||||
let aura = aura.select(service.on_exit()).then(|_| Ok(()));
|
||||
|
||||
// the AURA authoring task is considered essential, i.e. if it
|
||||
// fails we take down the service with it.
|
||||
service.spawn_essential_task(select);
|
||||
service.spawn_essential_task(aura);
|
||||
}
|
||||
|
||||
let grandpa_config = grandpa::Config {
|
||||
@@ -133,12 +133,12 @@ pub fn new_full<C: Send + Default + 'static>(config: Configuration<C, GenesisCon
|
||||
match (is_authority, disable_grandpa) {
|
||||
(false, false) => {
|
||||
// start the lightweight GRANDPA observer
|
||||
service.spawn_task(Box::new(grandpa::run_grandpa_observer(
|
||||
service.spawn_task(grandpa::run_grandpa_observer(
|
||||
grandpa_config,
|
||||
grandpa_link,
|
||||
service.network(),
|
||||
service.on_exit(),
|
||||
)?));
|
||||
)?);
|
||||
},
|
||||
(true, false) => {
|
||||
// start the full GRANDPA voter
|
||||
|
||||
Reference in New Issue
Block a user