mirror of
https://github.com/jmcorgan/fips.git
synced 2026-08-09 08:14:42 +00:00
Route the auto-connect floor and the connection-retry mechanism through the sans-IO reconciler instead of the imperative Node methods. A thin peering driver (note_handshake_timeout / note_link_dead) centralizes the reflex path with the gate guard and the already-connected check; the per-tick retry-dial and the startup floor build reconciler inputs and execute the emitted Connect intents. The three imperative retry methods are removed and their call sites rerouted. Wire the drain and startup gates. Entering a bounded drain now clears the retry schedule and suppresses the peer-loss reconnect reflex (the drain window runs under the Suspended gate), so the drain no longer fights a reconnect for the peers it just closed. The startup floor runs under an explicit Reconciling gate at the existing peer-connect seam, preserving the current dial position. Behavior-neutral except the intended drain change. Overlay discovery and opportunistic transport-neighbor growth remain imperative for now; they observe the relocated retry schedule and are cut over next. Unit tests migrated to the driver API with assertions unchanged (1607).
15 lines
695 B
Rust
15 lines
695 B
Rust
//! Peering homeostasis — the desired-state controller for the node's peer set.
|
|
//!
|
|
//! This module is the home for the peering-reconciler concept: config defines a
|
|
//! desired peer set; the reconciler converges the observed set toward it
|
|
//! (auto-connect floor, overlay pool, transport-neighbor growth) under the
|
|
//! `node.limits` ceiling. Startup and steady-state are the same loop.
|
|
//!
|
|
//! The cross-attempt retry schedule (`retry.rs`) lives here because a fresh
|
|
//! connection is created per re-dial, so the escalating backoff count must
|
|
//! persist in the reconciler, not per-connection.
|
|
|
|
pub(in crate::node) mod driver;
|
|
pub(in crate::node) mod reconcile;
|
|
pub(in crate::node) mod retry;
|