mirror of
https://github.com/jmcorgan/fips.git
synced 2026-08-11 09:07:44 +00:00
node: extract immutable state into a shared context and atomic metric registry
Store node counters in an atomic metric registry read through &self, and introduce a shared NodeContext bundle holding the effectively-immutable fields (config, identity, startup epoch, node profile, capability limits). Source the immutable config and identity reads across the receive hot path, the XX handshake/session/rekey state machines, and the discovery, tree, bloom, retry, and lifecycle modules through the context accessors. Includes the bloom delta/full/NACK/resize and byte-total counters in the registry. The Node fields and the context are rebuilt in lockstep at every mutation site.
This commit is contained in:
@@ -1468,8 +1468,9 @@ fn test_purge_idle_sessions_cleans_pending_packets() {
|
||||
|
||||
#[test]
|
||||
fn test_purge_idle_sessions_disabled_when_zero() {
|
||||
let mut node = make_node();
|
||||
node.config.node.session.idle_timeout_secs = 0;
|
||||
let mut config = Config::new();
|
||||
config.node.session.idle_timeout_secs = 0;
|
||||
let mut node = make_node_with(config);
|
||||
|
||||
let remote = Identity::generate();
|
||||
let remote_addr = *remote.node_addr();
|
||||
|
||||
Reference in New Issue
Block a user