Log the clogging networking messages (#1532)

This commit is contained in:
Pierre Krieger
2019-01-23 15:24:25 +01:00
committed by Gav Wood
parent cd86643f33
commit d30a8e0bc3
7 changed files with 46 additions and 11 deletions
@@ -166,6 +166,8 @@ pub enum BehaviourOut {
peer_id: PeerId,
/// Protocol which generated the message.
protocol_id: ProtocolId,
/// Copy of the messages that are within the buffer, for further diagnostic.
messages: Vec<Bytes>,
},
/// We have obtained debug information from a peer.
@@ -189,8 +191,8 @@ impl From<CustomProtosOut> for BehaviourOut {
CustomProtosOut::CustomMessage { protocol_id, peer_id, data } => {
BehaviourOut::CustomMessage { protocol_id, peer_id, data }
}
CustomProtosOut::Clogged { protocol_id, peer_id } => {
BehaviourOut::Clogged { protocol_id, peer_id }
CustomProtosOut::Clogged { protocol_id, peer_id, messages } => {
BehaviourOut::Clogged { protocol_id, peer_id, messages }
}
}
}