From a70c725e48b391a6b19deaed07ddd42649009b2a Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Wed, 15 Jul 2026 00:56:58 +0000 Subject: [PATCH] node: drop stale dead-code allows and a redundant clock read Remove the now-stale `#[allow(dead_code)]` on `advance_peer_machine` and `execute_peer_actions`; both are live (called from the link-dead reap, rekey cadence routing, and the handshake establish sites). In `route_rekey_cadence`, reuse the ambient context timestamp for the machine step instead of taking a second clock sample; the extra sample's only consumer was the currently-inert cutover drain timer, so the change is behavior-neutral. --- src/node/dataplane/peer_actions.rs | 2 -- src/node/handlers/rekey.rs | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/node/dataplane/peer_actions.rs b/src/node/dataplane/peer_actions.rs index 916fcc1..8ee9496 100644 --- a/src/node/dataplane/peer_actions.rs +++ b/src/node/dataplane/peer_actions.rs @@ -75,7 +75,6 @@ impl Node { /// `index_allocator` are **distinct `Node` fields**, so the collect below is /// a disjoint two-field borrow the checker accepts; once the actions are /// collected both borrows drop and the executor runs against `&mut self`. - #[allow(dead_code)] pub(in crate::node) async fn advance_peer_machine( &mut self, link: LinkId, @@ -100,7 +99,6 @@ impl Node { /// single flat future (no boxing) and the emitted order is preserved (the /// establish sequences always end in `PromoteToActive`, so its follow-ups run /// after any siblings). - #[allow(dead_code)] pub(in crate::node) async fn execute_peer_actions( &mut self, link: LinkId, diff --git a/src/node/handlers/rekey.rs b/src/node/handlers/rekey.rs index 48ef7e3..9fda5ec 100644 --- a/src/node/handlers/rekey.rs +++ b/src/node/handlers/rekey.rs @@ -117,7 +117,7 @@ impl Node { self.advance_peer_machine( link, PeerEvent::RekeyConsume { action }, - Self::now_ms(), + ambient.now_ms, &ambient, ) .await;