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
+2 -1
View File
@@ -38,7 +38,8 @@ use parking_lot::Mutex;
// Type aliases.
// These exist mainly to avoid typing `<F as Factory>::Foo` all over the code.
/// Network service type for a factory.
pub type NetworkService<F> = network::Service<<F as ServiceFactory>::Block, <F as ServiceFactory>::NetworkProtocol>;
pub type NetworkService<F> =
network::NetworkService<<F as ServiceFactory>::Block, <F as ServiceFactory>::NetworkProtocol>;
/// Code executor type for a factory.
pub type CodeExecutor<F> = NativeExecutor<<F as ServiceFactory>::RuntimeDispatch>;