Update Substrate (#661)

* Make compat with exit-future updates

* Update exit-future entirely

* Tidy

* Bump Substrate
This commit is contained in:
Gavin Wood
2019-12-04 19:56:16 +01:00
committed by GitHub
parent 0bf7d294ba
commit 040b0dbea2
13 changed files with 186 additions and 166 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ parking_lot = "0.9.0"
tokio = "0.1.22"
derive_more = "0.14.1"
log = "0.4.8"
exit-future = "0.1.4"
exit-future = "0.2.0"
tokio-executor = { version = "0.2.0-alpha.6", features = ["blocking"] }
codec = { package = "parity-scale-codec", version = "1.1.0", default-features = false, features = ["derive"] }
availability_store = { package = "polkadot-availability-store", path = "../availability-store" }
@@ -30,7 +30,7 @@ use sp_blockchain::HeaderBackend;
use block_builder::BlockBuilderApi;
use consensus::SelectChain;
use futures::prelude::*;
use futures03::{TryStreamExt as _, StreamExt as _};
use futures03::{TryStreamExt as _, StreamExt as _, FutureExt as _, TryFutureExt as _};
use log::error;
use polkadot_primitives::Block;
use polkadot_primitives::parachain::ParachainHost;
@@ -107,7 +107,7 @@ pub(crate) fn start<C, N, P, SC>(
}
Ok(())
})
.select(exit.clone())
.select(exit.clone().unit_error().compat())
.then(|_| Ok(()))
};
@@ -130,7 +130,7 @@ pub(crate) fn start<C, N, P, SC>(
}
})
.map_err(|e| warn!("Timer error {:?}", e))
.select(exit.clone())
.select(exit.clone().unit_error().compat())
.then(|_| Ok(()))
};
@@ -139,7 +139,7 @@ pub(crate) fn start<C, N, P, SC>(
error!("Failed to spawn old sessions pruning task");
}
if let Err(e) = runtime.block_on(exit) {
if let Err(e) = runtime.block_on(exit.unit_error().compat()) {
debug!("BFT event loop error {:?}", e);
}
});
@@ -153,7 +153,7 @@ pub(crate) fn start<C, N, P, SC>(
impl Drop for ServiceHandle {
fn drop(&mut self) {
if let Some(signal) = self.exit_signal.take() {
signal.fire();
let _ = signal.fire();
}
if let Some(thread) = self.thread.take() {
+1 -1
View File
@@ -456,7 +456,7 @@ impl<C, N, P> ParachainValidation<C, N, P> where
})
.and_then(with_router)
.then(|_| Ok(()))
.select(exit)
.select(exit.unit_error().compat())
.then(|_| Ok(()));
// spawn onto thread pool.