diff options
| author | tv <tv@krebsco.de> | 2026-11-03 02:43:15 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-03 02:43:15 +0100 |
| commit | 5cd26d321b706113afb8431aba35ab8fb32281c4 (patch) | |
| tree | ae1a64479a29182c44a2375417f74583e4ee074a /src/transport/wire.rs | |
| parent | e4709cc6ab3fca7f7ce40793aa5cceb64f0bfea3 (diff) | |
announcements answered only if heads differ
Diffstat (limited to 'src/transport/wire.rs')
| -rw-r--r-- | src/transport/wire.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/transport/wire.rs b/src/transport/wire.rs index d72fba4..d3bf39d 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 = 15; +pub(crate) const VERSION: u8 = 16; /// What the second byte of a payload says. fn tag(kind: MessageKind) -> u8 { @@ -369,6 +369,7 @@ pub(crate) fn samples() -> Vec<ParsedMessage> { ready: true, syncs_with_you: true, leaving: false, + announcing: false, }; let proof = IdentityProof { key: [8; 32], @@ -549,6 +550,7 @@ mod tests { ready: true, syncs_with_you: false, leaving: false, + announcing: false, }; let decoded = decode(&encode(&ParsedMessage::StatusReply(status.clone())).unwrap()).unwrap(); @@ -572,6 +574,7 @@ mod tests { ready: true, syncs_with_you: true, leaving: false, + announcing: false, }; assert!(decode(&encode(&ParsedMessage::Status(status)).unwrap()).is_err()); } @@ -669,10 +672,11 @@ mod tests { ready: true, syncs_with_you: false, leaving: false, + announcing: true, }); assert_eq!( hex(&encode(&status).unwrap()), - format!("{v}03969290c400{epoch_hex}01c3c2c2") + format!("{v}03979290c400{epoch_hex}01c3c2c2c3") ); let who = ParsedMessage::Who(IdentityProof { |
