Browse Source

add unimplemented reminders for relay

Chelsea H. Komlo 4 years ago
parent
commit
52b62faf92
1 changed files with 5 additions and 3 deletions
  1. 5 3
      relay.py

+ 5 - 3
relay.py

@@ -892,7 +892,7 @@ class RelayChannelManager(ChannelManager):
             deckey = nacl.hash.sha256(secret + b'upstream')
             circhandler.add_crypt_layer(enckey, deckey)
 
-            print("WARNING: Unimplemented! Should check the TTL, if it isn't \
+            logging.debug("WARNING: Unimplemented! Should check the TTL, if it isn't \
                     zero, decriment it and pass it along. Otherwise, just reply \
                     without extending.")
 
@@ -902,13 +902,15 @@ class RelayChannelManager(ChannelManager):
             #    key in conjunction with our own
             # 2. blinding each of the client's public keys to send to the next
             #    hop.
-            idx, blinded_client_pubkey = Sphinx.server(msg.client_path_selection_key,
+            idx_as_hex, blinded_client_pubkey = Sphinx.server(msg.client_path_selection_key,
             self.path_selection_key, b'circuit', False, self.perfstats)
 
+            logging.debug("RelayChannelManager: Unimplemented! need to translate idx into endive index")
+
             sys.exit("TODO convert shared secret into integer type modulo alpha")
             nexthop = self.relaypicker.pick_relay_by_uniform_index(idx)
             if nexthop == None:
-                print("WARNING: Unimplemented! Need to validate next hop is not null, if it is, we should send a CLOSE cell.")
+                logging.debug("WARNING: Unimplemented! Need to validate next hop is not null, if it is, we should send a CLOSE cell.")
 
             # Add a handler for once the next relay replies to say that the
             # circuit has been created