mirror of
https://github.com/jmcorgan/fips.git
synced 2026-08-09 16:24:45 +00:00
node: home the peering concept; relocate the connection-retry schedule
Create src/node/peering/ as the home for the peer desired-state (homeostatic reconciler) concept and move the cross-attempt connection retry schedule into it: RetryState plus schedule_retry / schedule_reconnect / process_pending_retries. Mechanical relocation only. The methods remain inherent on Node; the retry_count must persist across re-dials (a fresh connection is created each attempt), which is why the schedule belongs in the peering home rather than on a per-connection type. The one-level-deeper module path requires pub(super) -> pub(in crate::node) to preserve the prior scope, plus module-path fixups at the reference sites. No behavior change; unit test count unchanged (1596).
This commit is contained in:
+3
-3
@@ -15,10 +15,10 @@ pub(crate) mod encrypt_worker;
|
||||
mod handlers;
|
||||
mod lifecycle;
|
||||
pub(crate) mod metrics;
|
||||
mod peering;
|
||||
mod rate_limit;
|
||||
pub(crate) mod reject;
|
||||
mod reloadable;
|
||||
mod retry;
|
||||
pub(crate) mod session;
|
||||
pub(crate) mod stats;
|
||||
pub(crate) mod stats_history;
|
||||
@@ -450,7 +450,7 @@ pub struct Node {
|
||||
/// Keyed by NodeAddr. Entries are created when a handshake times out
|
||||
/// or fails, and removed on successful promotion or when max retries
|
||||
/// are exhausted.
|
||||
retry_pending: HashMap<NodeAddr, retry::RetryState>,
|
||||
retry_pending: HashMap<NodeAddr, peering::retry::RetryState>,
|
||||
|
||||
// === Periodic Parent Re-evaluation ===
|
||||
/// Timestamp of last periodic parent re-evaluation (for pacing).
|
||||
@@ -2496,7 +2496,7 @@ impl Node {
|
||||
}
|
||||
|
||||
/// Iterate over retry state for diagnostics.
|
||||
pub fn retry_state_iter(&self) -> impl Iterator<Item = (&NodeAddr, &retry::RetryState)> {
|
||||
pub fn retry_state_iter(&self) -> impl Iterator<Item = (&NodeAddr, &peering::retry::RetryState)> {
|
||||
self.retry_pending.iter()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user