aboutsummaryrefslogtreecommitdiffstats
path: root/src/transport
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/mod.rs4
-rw-r--r--src/transport/wire.rs3
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(),
}],
}),