diff options
| author | tv <tv@krebsco.de> | 2026-11-05 02:14:44 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-05 02:14:44 +0100 |
| commit | d510e3a7b223b75b5187470432f909665b6cd967 (patch) | |
| tree | dce84899b17f8c962228843efdbfe95ccaed6a5c /src/transport | |
| parent | 3531e97f1b1d2894538e43b453dc0b5a925c3910 (diff) | |
dashboard: swarm-wide epoch shine
Diffstat (limited to 'src/transport')
| -rw-r--r-- | src/transport/mod.rs | 4 | ||||
| -rw-r--r-- | src/transport/wire.rs | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/transport/mod.rs b/src/transport/mod.rs index 0f009cb..04e0506 100644 --- a/src/transport/mod.rs +++ b/src/transport/mod.rs @@ -453,6 +453,10 @@ pub(crate) struct RelayedLinks { pub(crate) member: String, /// How long ago the member reported them (milliseconds). pub(crate) age_ms: u32, + /// The member's epoch, as its LINKS_REPLY said (`LinksReply::epoch`): a dashboard + /// shows who entered a new one, swarm-wide. + #[serde(with = "crate::transport::wire::codec::epoch")] + pub(crate) epoch: Epoch, pub(crate) links: Vec<Link>, } diff --git a/src/transport/wire.rs b/src/transport/wire.rs index b3a8ee9..475c7f2 100644 --- a/src/transport/wire.rs +++ b/src/transport/wire.rs @@ -14,7 +14,7 @@ use super::{EncodedMessage, MessageKind, ParsedMessage}; /// The wire format's version, the first byte of every payload. Bump it with every change /// to a message type or a codec (`golden_bytes` fails then). -pub(crate) const VERSION: u8 = 27; +pub(crate) const VERSION: u8 = 28; /// What the second byte of a payload says. fn tag(kind: MessageKind) -> u8 { @@ -462,6 +462,7 @@ pub(crate) fn samples() -> Vec<ParsedMessage> { relayed: vec![crate::transport::RelayedLinks { member: "q".into(), age_ms: 1200, + epoch, links: Vec::new(), }], }), |
