From 15e10b9435dbee0f55227245b5543fc23cba98ee Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Sat, 4 May 2024 19:15:57 +0200 Subject: [PATCH] Added expected hops property to link class --- RNS/Link.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/RNS/Link.py b/RNS/Link.py index 7cd5e61..8df9127 100644 --- a/RNS/Link.py +++ b/RNS/Link.py @@ -168,16 +168,19 @@ class Link: self.type = RNS.Destination.LINK self.owner = owner self.destination = destination + self.expected_hops = None self.attached_interface = None self.__remote_identity = None self.__track_phy_stats = False self._channel = None + if self.destination == None: self.initiator = False self.prv = X25519PrivateKey.generate() self.sig_prv = self.owner.identity.sig_prv else: self.initiator = True + self.expected_hops = RNS.Transport.hops_to(self.destination.hash) self.establishment_timeout = RNS.Reticulum.get_instance().get_first_hop_timeout(destination.hash) self.establishment_timeout += Link.ESTABLISHMENT_TIMEOUT_PER_HOP * max(1, RNS.Transport.hops_to(destination.hash)) self.prv = X25519PrivateKey.generate()