From d510e3a7b223b75b5187470432f909665b6cd967 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 5 Nov 2026 02:14:44 +0100 Subject: dashboard: swarm-wide epoch shine --- src/transport/mod.rs | 4 ++++ src/transport/wire.rs | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src/transport') 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, } 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 { relayed: vec![crate::transport::RelayedLinks { member: "q".into(), age_ms: 1200, + epoch, links: Vec::new(), }], }), -- cgit v1.3.1