diff options
| author | tv <tv@krebsco.de> | 2026-11-16 20:44:13 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-16 22:03:31 +0100 |
| commit | c534b25dbd94dc41731f98e4c4b2a170fe02c347 (patch) | |
| tree | 418e159d227599ff985e601dc3ab4f8da8b16af0 /src/transport/mod.rs | |
| parent | 5cabcbfa81d6293c96d28c603621be331f1f9b0f (diff) | |
handshake: the party its sender is of
In a swarm holding a store, a node's handshakes name the party it is of (`docs/store.md`,
Members), so that a peer tells whether it is a member before its entry reaches it: HELLO
and HELLO_REPLY carry `party`, as `--store-party` says, None elsewhere and without the
`federation` feature. Wire format version 52.
Diffstat (limited to 'src/transport/mod.rs')
| -rw-r--r-- | src/transport/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/transport/mod.rs b/src/transport/mod.rs index e366f72..ad45ce9 100644 --- a/src/transport/mod.rs +++ b/src/transport/mod.rs @@ -566,6 +566,9 @@ pub(crate) struct HelloRequest { /// a joining node takes as the root, where those it hears agree. #[serde(with = "serde_bytes")] pub(crate) root: Option<Vec<u8>>, + /// The party the sender is of, in a swarm holding a store (`--store-party`): nodes of + /// one sync with the nodes its parties list, each as its party's. None elsewhere. + pub(crate) party: Option<String>, } /// A peer a HELLO_REPLY lists: who it is, and where the sender reaches it. @@ -654,6 +657,8 @@ pub(crate) struct HelloReply { /// As `HelloRequest::root`. #[serde(with = "serde_bytes")] pub(crate) root: Option<Vec<u8>>, + /// As `HelloRequest::party`. + pub(crate) party: Option<String>, } /// Bytes shown as lowercase hex, e.g. run IDs in logs. @@ -688,6 +693,7 @@ impl std::fmt::Debug for HelloRequest { .field("run_id", &Hex(&self.run_id)) .field("handshake", &self.handshake) .field("root", &self.root.as_deref().map(Hex)) + .field("party", &self.party) .finish() } } @@ -705,6 +711,7 @@ impl std::fmt::Debug for HelloReply { .field("away_ms", &self.away_ms) .field("sender_run_id", &Hex(&self.sender_run_id)) .field("root", &self.root.as_deref().map(Hex)) + .field("party", &self.party) .finish() } } |
