From a60e4fc5f1de1938a74c39ebd22fad275e33c9b7 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Fri, 14 May 2021 21:36:44 +0200 Subject: [PATCH] Renamed has_path method --- Examples/Echo.py | 2 +- Examples/Filetransfer.py | 4 ++-- Examples/Link.py | 4 ++-- README.md | 2 +- RNS/Transport.py | 4 ++-- setup.py | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Examples/Echo.py b/Examples/Echo.py index 7f381e9..2b84247 100644 --- a/Examples/Echo.py +++ b/Examples/Echo.py @@ -111,7 +111,7 @@ def client(destination_hexhash, configpath, timeout=None): # Let's first check if RNS knows a path to the destination. # If it does, we'll load the server identity and create a packet - if RNS.Transport.hasPath(destination_hash): + if RNS.Transport.has_path(destination_hash): # To address the server, we need to know it's public # key, so we check if Reticulum knows this destination. diff --git a/Examples/Filetransfer.py b/Examples/Filetransfer.py index 6fd9cfa..6c4711e 100644 --- a/Examples/Filetransfer.py +++ b/Examples/Filetransfer.py @@ -209,10 +209,10 @@ def client(destination_hexhash, configpath): # Check if we know a path to the destination - if not RNS.Transport.hasPath(destination_hash): + if not RNS.Transport.has_path(destination_hash): RNS.log("Destination is not yet known. Requesting path and waiting for announce to arrive...") RNS.Transport.requestPath(destination_hash) - while not RNS.Transport.hasPath(destination_hash): + while not RNS.Transport.has_path(destination_hash): time.sleep(0.1) # Recall the server identity diff --git a/Examples/Link.py b/Examples/Link.py index f915bc4..1fdd650 100644 --- a/Examples/Link.py +++ b/Examples/Link.py @@ -110,10 +110,10 @@ def client(destination_hexhash, configpath): reticulum = RNS.Reticulum(configpath) # Check if we know a path to the destination - if not RNS.Transport.hasPath(destination_hash): + if not RNS.Transport.has_path(destination_hash): RNS.log("Destination is not yet known. Requesting path and waiting for announce to arrive...") RNS.Transport.requestPath(destination_hash) - while not RNS.Transport.hasPath(destination_hash): + while not RNS.Transport.has_path(destination_hash): time.sleep(0.1) # Recall the server identity diff --git a/README.md b/README.md index 065f154..ec4e782 100755 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Reticulum Network Stack α +Reticulum Network Stack β ========== Reticulum is a cryptography-based networking stack for wide-area networks built on readily available hardware, and can operate even with very high latency and extremely low bandwidth. Reticulum allows you to build very wide-area networks with off-the-shelf tools, and offers end-to-end encryption, autoconfiguring cryptographically backed multi-hop transport, efficient addressing, unforgeable packet acknowledgements and more. diff --git a/RNS/Transport.py b/RNS/Transport.py index 197acf0..7a8207e 100755 --- a/RNS/Transport.py +++ b/RNS/Transport.py @@ -970,7 +970,7 @@ class Transport: RNS.Packet(destination, packet_hash, context = RNS.Packet.CACHE_REQUEST).send() @staticmethod - def hasPath(destination_hash): + def has_path(destination_hash): if destination_hash in Transport.destination_table: return True else: @@ -1130,6 +1130,6 @@ class Transport: file = open(destination_table_path, "wb") file.write(umsgpack.packb(serialised_destinations)) file.close() - RNS.log("Done saving path table to storage", RNS.LOG_VERBOSE) + RNS.log("Done saving "+str(len(serialised_destinations))+" path table entries to storage", RNS.LOG_VERBOSE) except Exception as e: RNS.log("Could not save path table to storage, the contained exception was: "+str(e), RNS.LOG_ERROR) diff --git a/setup.py b/setup.py index 8f3c24c..308522c 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ with open("README.md", "r") as fh: setuptools.setup( name="rns", - version="0.1.9", + version="0.2.0", author="Mark Qvist", author_email="mark@unsigned.io", description="Self-configuring, encrypted and resilient mesh networking stack for LoRa, packet radio, WiFi and everything in between",