Switch consensus crates to new futures (#3146)

* Switch consensus-common to new futures

* Fix tests

* More tests fixing

* Fix Babe tests

* Fix Babe tests
This commit is contained in:
Pierre Krieger
2019-07-25 04:55:50 +02:00
committed by Gavin Wood
parent 3a6a309d84
commit b31dcdf342
21 changed files with 208 additions and 184 deletions
+1
View File
@@ -47,6 +47,7 @@ balances = { package = "srml-balances", path = "../../srml/balances" }
babe = { package = "substrate-consensus-babe", path = "../../core/consensus/babe", features = ["test-helpers"] }
consensus-common = { package = "substrate-consensus-common", path = "../../core/consensus/common" }
service-test = { package = "substrate-service-test", path = "../../core/service/test" }
futures03 = { package = "futures-preview", version = "0.3.0-alpha.17" }
[build-dependencies]
cli = { package = "substrate-cli", path = "../../core/cli" }
+2 -2
View File
@@ -381,11 +381,11 @@ mod tests {
digest.push(<DigestItem as CompatibleDigestItem>::babe_pre_digest(babe_pre_digest));
let proposer = proposer_factory.init(&parent_header).unwrap();
let new_block = proposer.propose(
let new_block = futures03::executor::block_on(proposer.propose(
inherent_data,
digest,
std::time::Duration::from_secs(1),
).expect("Error making test block");
)).expect("Error making test block");
let (new_header, new_body) = new_block.deconstruct();
let pre_hash = new_header.hash();