Introduce BuildParachainContext trait (#302)

* Introduce `BuildParachainContext` trait

* Change the structure and hide the actual network implementation behind a
trait

* Add functions to collator `Network` trait
This commit is contained in:
Bastian Köcher
2019-06-27 23:55:40 +02:00
committed by GitHub
parent 6eb3f92a8e
commit b92dd81300
5 changed files with 93 additions and 31 deletions
+2
View File
@@ -288,7 +288,9 @@ impl<P, E, N, T> ValidationNetwork<P, E, N, T> where
rx
}
}
impl<P, E, N, T> ValidationNetwork<P, E, N, T> where N: NetworkService {
/// Convert the given `CollatorId` to a `PeerId`.
pub fn collator_id_to_peer_id(&self, collator_id: CollatorId) ->
impl Future<Item=Option<PeerId>, Error=()> + Send