Specialization::on_message now takes Vec<u8> (#3054)

This commit is contained in:
Pierre Krieger
2019-07-08 15:34:05 +02:00
committed by Gavin Wood
parent 1e126eab2f
commit 3a002a9100
3 changed files with 6 additions and 5 deletions
@@ -38,7 +38,7 @@ pub trait NetworkSpecialization<B: BlockT>: Send + Sync + 'static {
&mut self,
ctx: &mut dyn Context<B>,
who: PeerId,
message: &mut Option<crate::message::Message<B>>
message: Vec<u8>
);
/// Called when a network-specific event arrives.
@@ -130,7 +130,7 @@ macro_rules! construct_simple_protocol {
&mut self,
_ctx: &mut $crate::Context<$block>,
_who: $crate::PeerId,
_message: &mut Option<$crate::message::Message<$block>>
_message: Vec<u8>,
) {
$( self.$sub_protocol_name.on_message(_ctx, _who, _message); )*
}