Update exit-future and make sc-cli compile on wasm (#4289)

* updated exit-future (github repo)

* Switch to broadcast crate

* Migrate client/cli

* Switch exit-future to modernize branch

* Small changes

* Switch to cargo version and fix fg tests

* Revert "Small changes"

This reverts commit a488106805d220cb4aee9e46a71481424c6d87d5.
This commit is contained in:
Ashley
2019-12-04 18:35:33 +01:00
committed by GitHub
parent c071276187
commit a58e8a6e45
11 changed files with 105 additions and 76 deletions
@@ -155,7 +155,7 @@ pub fn run_grandpa_observer<B, E, Block: BlockT<Hash=H256>, N, RA, SC>(
config: Config,
link: LinkHalf<B, E, Block, RA, SC>,
network: N,
on_exit: impl Future<Item=(),Error=()> + Clone + Send + 'static,
on_exit: impl futures03::Future<Output=()> + Clone + Send + Unpin + 'static,
) -> ::sp_blockchain::Result<impl Future<Item=(),Error=()> + Send + 'static> where
B: Backend<Block, Blake2Hasher> + 'static,
E: CallExecutor<Block, Blake2Hasher> + Send + Sync + 'static,
@@ -195,7 +195,9 @@ pub fn run_grandpa_observer<B, E, Block: BlockT<Hash=H256>, N, RA, SC>(
let observer_work = network_startup.and_then(move |()| observer_work);
Ok(observer_work.select(on_exit).map(|_| ()).map_err(|_| ()))
use futures03::{FutureExt, TryFutureExt};
Ok(observer_work.select(on_exit.map(Ok).compat()).map(|_| ()).map_err(|_| ()))
}
/// Future that powers the observer.