Added announce queue dropping to rnpath utility

This commit is contained in:
Mark Qvist 2022-05-13 16:18:13 +02:00
parent 1b50f5267a
commit af1a05ff6a
4 changed files with 49 additions and 4 deletions

View file

@ -837,6 +837,9 @@ class Reticulum:
if path == "path":
rpc_connection.send(self.drop_path(call["destination_hash"]))
if path == "announce_queues":
rpc_connection.send(self.drop_announce_queues())
rpc_connection.close()
except Exception as e:
@ -938,6 +941,16 @@ class Reticulum:
else:
return RNS.Transport.expire_path(destination)
def drop_announce_queues(self):
if self.is_connected_to_shared_instance:
rpc_connection = multiprocessing.connection.Client(self.rpc_addr, authkey=self.rpc_key)
rpc_connection.send({"drop": "announce_queues"})
response = rpc_connection.recv()
return response
else:
return RNS.Transport.drop_announce_queues()
def get_next_hop_if_name(self, destination):
if self.is_connected_to_shared_instance:
rpc_connection = multiprocessing.connection.Client(self.rpc_addr, authkey=self.rpc_key)