From 8f0b588831ac06913dd01a3ebd8bb523292d992e Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 3 Nov 2026 02:43:43 +0100 Subject: skip neighbours with our heads --- src/state/peer.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/state') diff --git a/src/state/peer.rs b/src/state/peer.rs index 24f9188..c9fa675 100644 --- a/src/state/peer.rs +++ b/src/state/peer.rs @@ -142,6 +142,10 @@ pub(crate) struct PeerState { /// How many heads its most recent keepalive listed (None if it sent a digest). pub(crate) reported_heads: Option, + /// The heads its most recent STATUS or STATUS_REPLY carried (an announcement's too), + /// with its epoch: once they are ours, it has every change we would announce to it + /// (`swarm::relay`). + pub(crate) last_heads: Option<(transport::Epoch, transport::HeadsSummary)>, /// 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`). @@ -232,6 +236,7 @@ impl PeerState { reports_ready: None, syncs_with_us: None, reported_heads: None, + last_heads: None, left: false, hello_attempts: 0, unreachable_since: None, -- cgit v1.3.1