Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
markqvist committed Dec 11, 2021
1 parent eeb424e commit 81158c2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
6 changes: 0 additions & 6 deletions RNS/Link.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,6 @@ def prove(self):
proof.send()
self.had_outbound()

# TODO: Remove debug
if proof.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)
Expand Down
18 changes: 0 additions & 18 deletions RNS/Transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,16 +455,6 @@ 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 Expand Up @@ -1042,9 +1032,6 @@ def inbound(raw, interface=None):
# Handling for proofs and link-request proofs
elif packet.packet_type == RNS.Packet.PROOF:
if packet.context == RNS.Packet.LRPROOF:
# TODO: Remove debug
RNS.log("Link request proof received")

# This is a link request proof, check if it
# needs to be transported
if (RNS.Reticulum.transport_enabled() or for_local_client_link or from_local_client) and packet.destination_hash in Transport.link_table:
Expand All @@ -1061,15 +1048,10 @@ def inbound(raw, interface=None):
else:
RNS.log("Link request proof received on wrong interface, not transporting it.", RNS.LOG_DEBUG)
else:
# TODO: Remove debug
RNS.log("Could not transport link request proof")

# Check if we can deliver it to a local
# pending link
for link in Transport.pending_links:
if link.link_id == packet.destination_hash:
# TODO: Remove debug
RNS.log("Delivering link request proof to local pending link", RNS.LOG_DEBUG)
link.validate_proof(packet)

elif packet.context == RNS.Packet.RESOURCE_PRF:
Expand Down

0 comments on commit 81158c2

Please sign in to comment.