Skip to content

Commit

Permalink
Link proof debug
Browse files Browse the repository at this point in the history
  • Loading branch information
markqvist committed Dec 11, 2021
1 parent 20dfbcf commit 0273328
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
7 changes: 7 additions & 0 deletions RNS/Link.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,13 @@ def prove(self):
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
Expand Down
10 changes: 10 additions & 0 deletions RNS/Transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,16 @@ def outbound(packet):
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]
Expand Down

0 comments on commit 0273328

Please sign in to comment.