mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 22:07:58 +00:00
Upgrade from futures-preview to futures 0.3.1, and remove futures 0.1 where currently possible (#4083)
* Migrate node and node-template * Migrate srml * Simple changes * Add async-std for interval * Fix test-runtime warning * Small changes * move futures01 in core/rpc to dev-deps * Change wasm CI builds * Switch to async-std 1.0.1 * Remove async-std dep of network * Add modified lockfile * Fix node cli browser build * Remove authority-discovery async-std dep * Add Send + Sync to interval dyn stream
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
use crate::{DiscoveryNetBehaviour, config::ProtocolId};
|
||||
use crate::legacy_proto::{LegacyProto, LegacyProtoOut};
|
||||
use crate::utils::interval;
|
||||
use bytes::BytesMut;
|
||||
use futures::prelude::*;
|
||||
use futures03::{StreamExt as _, TryStreamExt as _};
|
||||
@@ -430,8 +431,8 @@ impl<B: BlockT, S: NetworkSpecialization<B>, H: ExHashT> Protocol<B, S, H> {
|
||||
let behaviour = LegacyProto::new(protocol_id, versions, peerset);
|
||||
|
||||
let protocol = Protocol {
|
||||
tick_timeout: Box::new(futures_timer::Interval::new(TICK_TIMEOUT).map(|v| Ok::<_, ()>(v)).compat()),
|
||||
propagate_timeout: Box::new(futures_timer::Interval::new(PROPAGATE_TIMEOUT).map(|v| Ok::<_, ()>(v)).compat()),
|
||||
tick_timeout: Box::new(interval(TICK_TIMEOUT).map(|v| Ok::<_, ()>(v)).compat()),
|
||||
propagate_timeout: Box::new(interval(PROPAGATE_TIMEOUT).map(|v| Ok::<_, ()>(v)).compat()),
|
||||
config,
|
||||
context_data: ContextData {
|
||||
peers: HashMap::new(),
|
||||
|
||||
Reference in New Issue
Block a user