mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-01 11:17:56 +00:00
Switch the telemetry to new futures (#3100)
* Switch the telemetry to new futures * Line widths * Apply suggestions from code review Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * Fix Cargo.lock
This commit is contained in:
committed by
Gavin Wood
parent
bf2551a854
commit
b3dc472a9b
@@ -36,6 +36,7 @@ use parking_lot::Mutex;
|
||||
use client::{BlockchainEvents, backend::Backend, runtime_api::BlockT};
|
||||
use exit_future::Signal;
|
||||
use futures::prelude::*;
|
||||
use futures03::stream::{StreamExt as _, TryStreamExt as _};
|
||||
use keystore::Store as Keystore;
|
||||
use network::NetworkState;
|
||||
use log::{info, warn, debug, error};
|
||||
@@ -446,6 +447,8 @@ impl<Components: components::Components> Service<Components> {
|
||||
wasm_external_transport: config.telemetry_external_transport.take(),
|
||||
});
|
||||
let future = telemetry.clone()
|
||||
.map(|ev| Ok::<_, ()>(ev))
|
||||
.compat()
|
||||
.for_each(move |event| {
|
||||
// Safe-guard in case we add more events in the future.
|
||||
let tel::TelemetryEvent::Connected = event;
|
||||
|
||||
Reference in New Issue
Block a user