mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 20:27:58 +00:00
Update the service to std futures (#4447)
* Switch service to futures03 * Fix tests * Fix service test and cli * Re-add Executor trait to SpawnTaskHandle * Fix node-service * Update babe * Fix browser node * Update aura * Revert back to tokio-executor to fix runtime panic * Add todo item * Fix service tests again * Timeout test futures * Fix tests * nits * Fix service test * Remove zstd patch * Re-add futures01 to aura and babe tests as a dev-dep * Change failing test to tee * Fix node * Upgrade tokio * fix society * Start switching grandpa to stable futures * Revert "Start switching grandpa to stable futures" This reverts commit 9c1976346237637effc07c13f7d0403daf5e71cf. * Fix utils * Revert substrate service test * Revert gitlab Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
@@ -113,8 +113,8 @@ macro_rules! new_full_start {
|
||||
macro_rules! new_full {
|
||||
($config:expr, $with_startup_data: expr) => {{
|
||||
use futures::{
|
||||
stream::StreamExt,
|
||||
future::{FutureExt, TryFutureExt},
|
||||
prelude::*,
|
||||
compat::Future01CompatExt
|
||||
};
|
||||
use sc_network::Event;
|
||||
|
||||
@@ -191,9 +191,8 @@ macro_rules! new_full {
|
||||
service.keystore(),
|
||||
dht_event_stream,
|
||||
);
|
||||
let future01_authority_discovery = authority_discovery.map(|x| Ok(x)).compat();
|
||||
|
||||
service.spawn_task(future01_authority_discovery);
|
||||
service.spawn_task(authority_discovery);
|
||||
}
|
||||
|
||||
// if the node isn't actively participating in consensus then it doesn't
|
||||
@@ -223,7 +222,7 @@ macro_rules! new_full {
|
||||
service.network(),
|
||||
service.on_exit(),
|
||||
service.spawn_task_handle(),
|
||||
)?);
|
||||
)?.compat().map(drop));
|
||||
},
|
||||
(true, false) => {
|
||||
// start the full GRANDPA voter
|
||||
@@ -239,7 +238,9 @@ macro_rules! new_full {
|
||||
};
|
||||
// the GRANDPA voter task is considered infallible, i.e.
|
||||
// if it fails we take down the service with it.
|
||||
service.spawn_essential_task(grandpa::run_grandpa_voter(grandpa_config)?);
|
||||
service.spawn_essential_task(
|
||||
grandpa::run_grandpa_voter(grandpa_config)?.compat().map(drop)
|
||||
);
|
||||
},
|
||||
(_, true) => {
|
||||
grandpa::setup_disabled_grandpa(
|
||||
|
||||
Reference in New Issue
Block a user