aboutsummaryrefslogtreecommitdiffstats
path: root/src/transport/traffic.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-07 22:35:21 +0100
committertv <tv@krebsco.de>2026-11-07 22:35:21 +0100
commitc3fde0fdd410902125f006f0a7d77ca030cb9061 (patch)
treed5506388f0f94b77c5172c96074ff68b54186726 /src/transport/traffic.rs
parent2ff408c024a0ef5db2a770e8a091783f1b6d9cfc (diff)
signatures: on their own (SIGNATURES)
Signatures no sync message took go on their own within a second, to each peer not sent them yet (wire version bumped). Auth plan M5.
Diffstat (limited to 'src/transport/traffic.rs')
-rw-r--r--src/transport/traffic.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/transport/traffic.rs b/src/transport/traffic.rs
index 13ca9fa..180d3b5 100644
--- a/src/transport/traffic.rs
+++ b/src/transport/traffic.rs
@@ -57,6 +57,8 @@ pub(crate) struct ByKind {
pub(crate) plumtree: Counter,
/// NEIGHBOUR, NEIGHBOUR_REPLY and DISCONNECT (`swarm::hyparview`).
pub(crate) hyparview: Counter,
+ /// SIGNATURES (`swarm::signatures`).
+ pub(crate) signatures: Counter,
}
impl ByKind {
@@ -73,6 +75,7 @@ impl ByKind {
MessageKind::Probe,
MessageKind::Prune,
MessageKind::Neighbour,
+ MessageKind::Signatures,
] {
let theirs = *other.get(kind);
self.get_mut(kind).absorb(theirs);
@@ -94,6 +97,7 @@ impl ByKind {
MessageKind::Neighbour | MessageKind::NeighbourReply | MessageKind::Disconnect => {
&self.hyparview
}
+ MessageKind::Signatures => &self.signatures,
}
}
@@ -112,6 +116,7 @@ impl ByKind {
MessageKind::Neighbour | MessageKind::NeighbourReply | MessageKind::Disconnect => {
&mut self.hyparview
}
+ MessageKind::Signatures => &mut self.signatures,
}
}
}
@@ -321,6 +326,7 @@ fn names(kind: MessageKind) -> (&'static str, &'static str) {
MessageKind::Neighbour => ("NEIGHBOUR", "hyparview"),
MessageKind::NeighbourReply => ("NEIGHBOUR_REPLY", "hyparview"),
MessageKind::Disconnect => ("DISCONNECT", "hyparview"),
+ MessageKind::Signatures => ("SIGNATURES", "signatures"),
}
}