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
+5 -3
View File
@@ -555,7 +555,7 @@ pub fn run_grandpa_voter<B, E, Block: BlockT<Hash=H256>, N, RA, SC, VR, X>(
NumberFor<Block>: BlockNumberOps,
DigestFor<Block>: Encode,
RA: Send + Sync + 'static,
X: Future<Item=(),Error=()> + Clone + Send + 'static,
X: futures03::Future<Output=()> + Clone + Send + Unpin + 'static,
{
let GrandpaParams {
config,
@@ -634,7 +634,9 @@ pub fn run_grandpa_voter<B, E, Block: BlockT<Hash=H256>, N, RA, SC, VR, X>(
let telemetry_task = telemetry_task
.then(|_| futures::future::empty::<(), ()>());
Ok(voter_work.select(on_exit).select2(telemetry_task).then(|_| Ok(())))
use futures03::{FutureExt, TryFutureExt};
Ok(voter_work.select(on_exit.map(Ok).compat()).select2(telemetry_task).then(|_| Ok(())))
}
/// Future that powers the voter.
@@ -889,7 +891,7 @@ pub fn run_grandpa<B, E, Block: BlockT<Hash=H256>, N, RA, SC, VR, X>(
DigestFor<Block>: Encode,
RA: Send + Sync + 'static,
VR: VotingRule<Block, Client<B, E, Block, RA>> + Clone + 'static,
X: Future<Item=(),Error=()> + Clone + Send + 'static,
X: futures03::Future<Output=()> + Clone + Send + Unpin + 'static,
{
run_grandpa_voter(grandpa_params)
}