From 93526c17f54528d3aa6019a71aa1893202242229 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Thu, 23 Jul 2026 17:52:45 +0200 Subject: [PATCH] Added rebalanced time to links --- RNS/Transport.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RNS/Transport.py b/RNS/Transport.py index 54a5e319..acbdd7a4 100755 --- a/RNS/Transport.py +++ b/RNS/Transport.py @@ -2294,11 +2294,11 @@ class Transport: signature = packet_data[:RNS.Identity.SIGLENGTH//8] if link.destination.identity.validate(signature, signed_data): - RNS.log(f"Re-balancing path to {RNS.prettyhexrep(link.destination.hash)} at link terminus ({link.expected_hops}->{packet.hops})", REBALANCE_LOGLEVEL) if RNS.sl(REBALANCE_LOGLEVEL) else None - link.expected_hops = packet.hops with Transport.path_table_lock: if not link.rebalanced: + RNS.log(f"Re-balancing path to {RNS.prettyhexrep(link.destination.hash)} at link terminus ({link.expected_hops}->{packet.hops})", REBALANCE_LOGLEVEL) if RNS.sl(REBALANCE_LOGLEVEL) else None link.rebalanced = time.time() + link.expected_hops = packet.hops if link.destination.hash in Transport.path_table: path_entry = Transport.path_table[link.destination.hash] path_entry[IDX_PT_HOPS] = packet.hops