From 06dc4ad550061f842343cd7a7ee610ce2a6ef87c Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Tue, 29 Sep 2026 11:58:50 +0200 Subject: [PATCH] Fixed instances of announce_cap property ensurance logic not storing announce cap value as a fraction. By JRG (commit 0b88890f512410d6e76e3785c3919657a2b34aa4) --- RNS/Interfaces/Interface.py | 2 +- RNS/Transport.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/RNS/Interfaces/Interface.py b/RNS/Interfaces/Interface.py index 7b9839c1..915102a6 100755 --- a/RNS/Interfaces/Interface.py +++ b/RNS/Interfaces/Interface.py @@ -389,7 +389,7 @@ class Interface: def process_announce_queue(self): if not hasattr(self, "announce_cap"): - self.announce_cap = RNS.Reticulum.ANNOUNCE_CAP + self.announce_cap = RNS.Reticulum.ANNOUNCE_CAP/100.0 if hasattr(self, "announce_queue"): try: diff --git a/RNS/Transport.py b/RNS/Transport.py index ca4fab8f..2a46569f 100755 --- a/RNS/Transport.py +++ b/RNS/Transport.py @@ -1521,7 +1521,7 @@ class Transport: # TODO: Rethink whether this is actually optimal. if packet.hops > 0: - if not hasattr(interface, "announce_cap"): interface.announce_cap = RNS.Reticulum.ANNOUNCE_CAP + if not hasattr(interface, "announce_cap"): interface.announce_cap = RNS.Reticulum.ANNOUNCE_CAP/100.0 if not hasattr(interface, "announce_allowed_at"): interface.announce_allowed_at = 0 if not hasattr(interface, "announce_queue"): interface.announce_queue = [] @@ -3299,7 +3299,7 @@ class Transport: packet = RNS.Packet(path_request_dst, path_request_data, packet_type = RNS.Packet.DATA, transport_type = RNS.Transport.BROADCAST, header_type = RNS.Packet.HEADER_1, attached_interface = on_interface) if on_interface != None and recursive: - if not hasattr(on_interface, "announce_cap"): on_interface.announce_cap = RNS.Reticulum.ANNOUNCE_CAP + if not hasattr(on_interface, "announce_cap"): on_interface.announce_cap = RNS.Reticulum.ANNOUNCE_CAP/100.0 if not hasattr(on_interface, "announce_allowed_at"): on_interface.announce_allowed_at = 0 if not hasattr(on_interface, "announce_queue"): on_interface.announce_queue = []