mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-06 05:38:00 +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:
@@ -17,7 +17,7 @@
|
||||
//! Console informant. Prints sync progress and block events. Runs on the calling thread.
|
||||
|
||||
use sc_client_api::BlockchainEvents;
|
||||
use futures::{StreamExt, TryStreamExt, FutureExt, future, compat::Stream01CompatExt};
|
||||
use futures::prelude::*;
|
||||
use log::{info, warn, trace};
|
||||
use sp_runtime::traits::Header;
|
||||
use sc_service::AbstractService;
|
||||
@@ -33,8 +33,7 @@ pub fn build(service: &impl AbstractService) -> impl futures::Future<Output = ()
|
||||
|
||||
let display_notifications = service
|
||||
.network_status(Duration::from_millis(5000))
|
||||
.compat()
|
||||
.try_for_each(move |(net_status, _)| {
|
||||
.for_each(move |(net_status, _)| {
|
||||
let info = client.usage_info();
|
||||
if let Some(ref usage) = info.usage {
|
||||
trace!(target: "usage", "Usage statistics: {}", usage);
|
||||
@@ -42,7 +41,7 @@ pub fn build(service: &impl AbstractService) -> impl futures::Future<Output = ()
|
||||
trace!(target: "usage", "Usage statistics not displayed as backend does not provide it")
|
||||
}
|
||||
display.display(&info, net_status);
|
||||
future::ok(())
|
||||
future::ready(())
|
||||
});
|
||||
|
||||
let client = service.client();
|
||||
|
||||
Reference in New Issue
Block a user