node: source connection start/activity timestamps from the peer machine

The connection leg's started_at and last_activity duplicated the peer
machine's own connection-state copy. Make the machine copy the sole live
telemetry and timeout carrier: re-stamp it with the leg's provenance when
the leg is attached at handshake start (the msg1-prep clock, not the earlier
dial-time constructor value) and mirror the completion touch, then delete the
leg's last_activity/touch accessors and source the connection-row projection,
show_connections, and the timeout readers from the machine. Byte-identical
for all normal paths.
This commit is contained in:
Johnathan Corgan
2026-07-18 15:11:43 +00:00
parent 56bbc81a40
commit b3f2018fce
8 changed files with 95 additions and 22 deletions
+2 -2
View File
@@ -1308,8 +1308,8 @@ pub fn show_connections(node: &Node) -> Value {
"link_id": conn.link_id().as_u64(),
"direction": format!("{}", conn.direction()),
"handshake_state": node.connection_handshake_state(conn.link_id()),
"started_at_ms": conn.started_at(),
"idle_ms": now.saturating_sub(conn.last_activity()),
"started_at_ms": node.connection_started_at(conn.link_id()),
"idle_ms": now.saturating_sub(node.connection_last_activity(conn.link_id())),
"resend_count": node.connection_resend_count(conn.link_id()),
});