From 0273328b23132a905fe9e025f1c410eaa9bd0ad2 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Sat, 11 Dec 2021 18:19:51 +0100 Subject: [PATCH] Link proof debug --- RNS/Link.py | 7 +++++++ RNS/Transport.py | 10 ++++++++++ 2 files changed, 17 insertions(+) diff --git a/RNS/Link.py b/RNS/Link.py index 4166458..151a97d 100644 --- a/RNS/Link.py +++ b/RNS/Link.py @@ -215,6 +215,13 @@ class Link: proof.send() self.had_outbound() + # TODO: Remove debug + if packet.sent: + RNS.log("The LR proof was sent") + else: + RNS.log("The LR proof was not sent") + + def prove_packet(self, packet): signature = self.sign(packet.packet_hash) # TODO: Hardcoded as explicit proof for now diff --git a/RNS/Transport.py b/RNS/Transport.py index e21074d..eced142 100755 --- a/RNS/Transport.py +++ b/RNS/Transport.py @@ -455,6 +455,16 @@ class Transport: packet.update_hash() sent = False + # TODO: Remove debug + if packet.context == RNS.Packet.LRPROOF: + RNS.log("Outbound LR proof") + RNS.log("Dest: "+RNS.prettyhexrep(packet.destination_hash)) + if packet.destination_hash in Transport.destination_table: + RNS.log("Exists in path table") + else: + RNS.log("Not in path table") + + # Check if we have a known path for the destination in the path table if packet.packet_type != RNS.Packet.ANNOUNCE and packet.destination_hash in Transport.destination_table: outbound_interface = Transport.destination_table[packet.destination_hash][5]