mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 11:41:04 +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:
@@ -14,9 +14,9 @@ client-api = { package = "substrate-client-api", path = "../../api" }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0" }
|
||||
consensus_common = { package = "substrate-consensus-common", path = "../../../primitives/consensus/common" }
|
||||
derive_more = "0.15.0"
|
||||
futures-preview = { version = "0.3.0-alpha.19", features = ["compat"] }
|
||||
futures-timer = "0.4.0"
|
||||
futures = { version = "0.3.1", features = ["compat"] }
|
||||
futures01 = { package = "futures", version = "0.1" }
|
||||
futures-timer = "0.4.0"
|
||||
inherents = { package = "substrate-inherents", path = "../../../primitives/inherents" }
|
||||
keystore = { package = "substrate-keystore", path = "../../keystore" }
|
||||
log = "0.4.8"
|
||||
|
||||
@@ -29,7 +29,7 @@ uncles = { package = "substrate-consensus-uncles", path = "../uncles" }
|
||||
slots = { package = "substrate-consensus-slots", path = "../slots" }
|
||||
sr-primitives = { path = "../../../primitives/sr-primitives" }
|
||||
fork-tree = { path = "../../../utils/fork-tree" }
|
||||
futures-preview = { version = "0.3.0-alpha.19", features = ["compat"] }
|
||||
futures = { version = "0.3.1", features = ["compat"] }
|
||||
futures01 = { package = "futures", version = "0.1" }
|
||||
futures-timer = "0.4.0"
|
||||
parking_lot = "0.9.0"
|
||||
|
||||
@@ -15,6 +15,6 @@ inherents = { package = "substrate-inherents", path = "../../../primitives/inher
|
||||
pow-primitives = { package = "substrate-consensus-pow-primitives", path = "../../../primitives/consensus/pow" }
|
||||
consensus-common = { package = "substrate-consensus-common", path = "../../../primitives/consensus/common" }
|
||||
log = "0.4.8"
|
||||
futures-preview = { version = "0.3.0-alpha.19", features = ["compat"] }
|
||||
futures = { version = "0.3.1", features = ["compat"] }
|
||||
sp-timestamp = { path = "../../../primitives/timestamp" }
|
||||
derive_more = "0.15.0"
|
||||
|
||||
@@ -14,8 +14,8 @@ sr-primitives = { path = "../../../primitives/sr-primitives" }
|
||||
substrate-telemetry = { path = "../../telemetry" }
|
||||
consensus_common = { package = "substrate-consensus-common", path = "../../../primitives/consensus/common" }
|
||||
inherents = { package = "substrate-inherents", path = "../../../primitives/inherents" }
|
||||
futures-preview = "0.3.0-alpha.19"
|
||||
futures-timer = "0.4.0"
|
||||
futures = "0.3.1"
|
||||
futures-timer = "2.0"
|
||||
parking_lot = "0.9.0"
|
||||
log = "0.4.8"
|
||||
|
||||
|
||||
@@ -192,12 +192,10 @@ pub trait SimpleSlotWorker<B: BlockT> {
|
||||
remaining_duration,
|
||||
).map_err(|e| consensus_common::Error::ClientImport(format!("{:?}", e))),
|
||||
Delay::new(remaining_duration)
|
||||
.map_err(consensus_common::Error::FaultyTimer)
|
||||
).map(|v| match v {
|
||||
futures::future::Either::Left((b, _)) => b.map(|b| (b, claim)),
|
||||
futures::future::Either::Right((Ok(_), _)) =>
|
||||
futures::future::Either::Right(_) =>
|
||||
Err(consensus_common::Error::ClientImport("Timeout in the Slots proposer".into())),
|
||||
futures::future::Either::Right((Err(err), _)) => Err(err),
|
||||
});
|
||||
|
||||
let block_import_params_maker = self.block_import_params();
|
||||
|
||||
@@ -137,8 +137,7 @@ impl<SC: SlotCompatible + Unpin> Stream for Slots<SC> {
|
||||
if let Some(ref mut inner_delay) = self.inner_delay {
|
||||
match Future::poll(Pin::new(inner_delay), cx) {
|
||||
Poll::Pending => return Poll::Pending,
|
||||
Poll::Ready(Err(err)) => return Poll::Ready(Some(Err(Error::FaultyTimer(err)))),
|
||||
Poll::Ready(Ok(())) => {}
|
||||
Poll::Ready(()) => {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user