mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-05-02 22:54:54 -04:00
Added announce queue dropping to rnpath utility
This commit is contained in:
parent
1b50f5267a
commit
af1a05ff6a
4 changed files with 49 additions and 4 deletions
|
@ -1798,6 +1798,20 @@ class Transport:
|
|||
if registered_destination.type == RNS.Destination.SINGLE:
|
||||
registered_destination.announce(path_response=True)
|
||||
|
||||
@staticmethod
|
||||
def drop_announce_queues():
|
||||
for interface in Transport.interfaces:
|
||||
if hasattr(interface, "announce_queue") and interface.announce_queue != None:
|
||||
na = len(interface.announce_queue)
|
||||
if na > 0:
|
||||
if na == 1:
|
||||
na_str = "1 announce"
|
||||
else:
|
||||
na_str = str(na)+" announces"
|
||||
|
||||
interface.announce_queue = []
|
||||
RNS.log("Dropped "+na_str+" on "+str(interface), RNS.LOG_VERBOSE)
|
||||
|
||||
@staticmethod
|
||||
def announce_emitted(packet):
|
||||
random_blob = packet.data[RNS.Identity.KEYSIZE//8:RNS.Identity.KEYSIZE//8+RNS.Reticulum.TRUNCATED_HASHLENGTH//8]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue