mirror of
https://github.com/markqvist/Reticulum.git
synced 2026-07-25 17:18:12 -07:00
Added rebalanced time to links
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user