Rewrite sync and network layers to use futures (#2683)

* Remove background thread from network

* Primarily use tokio-timer instead of tokio

* Minor style fix

* Reintroduce tokio as an optional dependency

* Renames

* Line width

* Ctxt -> Context

* Merge NetworkWorker and NetworkService
This commit is contained in:
Pierre Krieger
2019-05-29 11:58:02 +02:00
committed by Arkadiy Paronyan
parent 643e309411
commit e9a4c80c40
8 changed files with 172 additions and 205 deletions
+4 -2
View File
@@ -27,7 +27,8 @@ runtime_primitives = { package = "sr-primitives", path = "../../core/sr-primitiv
parity-codec = { version = "3.3", features = ["derive"] }
network_libp2p = { package = "substrate-network-libp2p", path = "../../core/network-libp2p" }
peerset = { package = "substrate-peerset", path = "../../core/peerset" }
tokio = "0.1.11"
tokio-timer = "0.2.11"
tokio = { version = "0.1.11", optional = true }
keyring = { package = "substrate-keyring", path = "../../core/keyring", optional = true }
test_client = { package = "substrate-test-client", path = "../../core/test-client", optional = true }
void = "1.0"
@@ -37,7 +38,8 @@ env_logger = { version = "0.6" }
keyring = { package = "substrate-keyring", path = "../../core/keyring" }
test_client = { package = "substrate-test-client", path = "../../core/test-client" }
consensus = { package = "substrate-consensus-common", path = "../../core/consensus/common", features = ["test-helpers"] }
tokio = "0.1.11"
[features]
default = []
test-helpers = ["keyring", "test_client", "consensus/test-helpers"]
test-helpers = ["keyring", "test_client", "consensus/test-helpers", "tokio"]