mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 08:11:03 +00:00
Add ProtocolBehaviour (#2922)
* Add ProtocolBehaviour * Fix tests * Line widths * Address concerns * Apply suggestions from code review Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * Remove TODO
This commit is contained in:
committed by
Gavin Wood
parent
48aa32bece
commit
e919d03331
@@ -38,9 +38,13 @@ use futures::sync::mpsc;
|
||||
|
||||
// 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::NetworkService<<F as ServiceFactory>::Block, <F as ServiceFactory>::NetworkProtocol>;
|
||||
|
||||
/// Network service type for `Components`.
|
||||
pub type NetworkService<C> = network::NetworkService<
|
||||
ComponentBlock<C>,
|
||||
<<C as Components>::Factory as ServiceFactory>::NetworkProtocol,
|
||||
ComponentExHash<C>
|
||||
>;
|
||||
|
||||
/// Code executor type for a factory.
|
||||
pub type CodeExecutor<F> = NativeExecutor<<F as ServiceFactory>::RuntimeDispatch>;
|
||||
|
||||
Reference in New Issue
Block a user