From db3c4e997f03a660ac37a6bdf86c6215726a71bd Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 28 Oct 2026 01:47:47 +0100 Subject: rename PING/PONG to STATUS/STATUS_REPLY --- src/state/timing.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/state/timing.rs') diff --git a/src/state/timing.rs b/src/state/timing.rs index 0dab3da..6ce5bef 100644 --- a/src/state/timing.rs +++ b/src/state/timing.rs @@ -21,7 +21,7 @@ pub(crate) struct Timing { pub(crate) dormant_after: Duration, pub(crate) resync_after: Duration, pub(crate) dormant_probe: Duration, - /// While catching up: PING the source after this much silence (`swarm::source`). + /// While catching up: send the source a STATUS after this much silence (`swarm::source`). pub(crate) catch_up_probe: Duration, /// First wait for an answer to a sync message before sending again; doubles while /// answers stay out (`SyncSession::reply_backoff`). @@ -42,8 +42,8 @@ impl Timing { /// The timings for `--keepalive`. /// /// Each node keeps about `k` neighbours (`--neighbours`) whatever the swarm's size, - /// and only one side of a pair pings, so idle, a node sends about `k` messages and - /// receives about `k` (PINGs and PONGs) per keepalive interval (more on a stable + /// and only one side of a pair sends them, so idle, a node sends about `k` messages and + /// receives about `k` (STATUSes and STATUS_REPLYs) per keepalive interval (more on a stable /// member others prefer). The interval trades that against how soon a silent peer is /// noticed (`dormant_after`, 4 intervals) and a gap closes (within an interval). /// Recommended: @@ -68,7 +68,7 @@ impl Timing { ) -> Self { Self { keepalive, - dormant_after: keepalive * 4, // dormant_after >= 4* keepalive to tolerate three lost PINGs in a row + dormant_after: keepalive * 4, // dormant_after >= 4* keepalive to tolerate three lost STATUSes in a row // >= 2 keepalives, so a second exchange confirms the difference; and >= twice // the first sync reply timeout, so a lost message's sender resends it first. resync_after: (keepalive * 2).max(sync_reply_timeout * 2), -- cgit v1.3.1