Link proof debug

This commit is contained in:
Mark Qvist 2021-12-11 18:19:51 +01:00
parent 20dfbcf0cc
commit 0273328b23
2 changed files with 17 additions and 0 deletions

View File

@ -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

View File

@ -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]