diff options
Diffstat (limited to 'src/transport/traffic.rs')
| -rw-r--r-- | src/transport/traffic.rs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/transport/traffic.rs b/src/transport/traffic.rs index 2e45a31..041471d 100644 --- a/src/transport/traffic.rs +++ b/src/transport/traffic.rs @@ -137,7 +137,8 @@ pub(crate) struct Logged { } /// What ties `message`, with `peer`, to other messages: a PING and its PONG (the -/// nonce), a LINKS and its replies (the nonce), a HELLO and its replies (the run of the +/// nonce alone: a PING may go to an address and its PONG come back up from the node +/// there, `paths`), a LINKS and its replies (the nonce), a HELLO and its replies (the run of the /// node that sent the HELLO, which the reply echoes), a blob's requests and answers, from /// any peer (its ID), and a delta offered in a SYNC with the blob it is fetched as. None /// for the rest (a STATUS and its reply carry nothing of the kind). @@ -145,7 +146,7 @@ fn related(peer: &str, message: &ParsedMessage) -> Option<String> { use crate::transport::{Hex, SyncBody}; Some(match message { ParsedMessage::Ping(nonce) | ParsedMessage::Pong { nonce, .. } => { - format!("ping {peer} {nonce}") + format!("ping {nonce}") } ParsedMessage::Links(request) => format!("links {peer} {}", request.nonce), ParsedMessage::LinksReply(reply) => format!("links {peer} {}", reply.nonce), @@ -173,7 +174,13 @@ impl MessageLog { } } - fn note(&self, way: &'static str, peer: &str, message: &ParsedMessage, bytes: usize) { + pub(crate) fn note( + &self, + way: &'static str, + peer: &str, + message: &ParsedMessage, + bytes: usize, + ) { if !self.watching.load(Ordering::Relaxed) { return; } |
