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:
Johnathan Corgan
2026-07-13 03:30:52 +00:00
parent d61d189572
commit a45eefb58a
5 changed files with 24 additions and 12 deletions
+1 -1
View File
@@ -2242,7 +2242,7 @@ impl Node {
.or_insert_with(|| peer_identity.short_npub());
self.register_identity(node_addr, peer_identity.pubkey_full());
let mut state = super::retry::RetryState::new(PeerConfig {
let mut state = super::peering::retry::RetryState::new(PeerConfig {
npub: npub.clone(),
alias: None,
addresses,