diff options
| author | tv <tv@krebsco.de> | 2026-11-03 04:44:49 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-03 04:44:49 +0100 |
| commit | 5581992d5603322d7f02bd76625334be3f8a2b18 (patch) | |
| tree | 3c904680730e7fa6071b2712746092c67d91e644 /src/state/peer.rs | |
| parent | 05dc2d0373cc8d7b0dc4da63a03a7850e4fefdc8 (diff) | |
measure 2-hop neighbourhood
Diffstat (limited to 'src/state/peer.rs')
| -rw-r--r-- | src/state/peer.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/state/peer.rs b/src/state/peer.rs index c6558d7..1e09079 100644 --- a/src/state/peer.rs +++ b/src/state/peer.rs @@ -151,6 +151,8 @@ pub(crate) struct PeerState { /// says so). Both lazy (announced only) until a pull makes ours eager. pub(crate) eager_to: bool, pub(crate) eager_from: bool, + /// Whom it said it reaches (`swarm::reach`), by pair key, and when. + pub(crate) reaches: Option<(Instant, Vec<u64>)>, /// It said farewell (`say_farewell`): what else that run of it still sends while it /// stops doesn't make it active again; a message from another run does (`returned`). @@ -244,6 +246,7 @@ impl PeerState { last_heads: None, eager_to: false, eager_from: false, + reaches: None, left: false, hello_attempts: 0, unreachable_since: None, @@ -262,6 +265,8 @@ impl PeerState { // The link starts lazy again: a pull makes it eager when it proves itself. self.eager_to = false; self.eager_from = false; + // Said over the session that ended. + self.reaches = None; } /// An overdue sync answer from an established, active peer (see |
