Browse Source

pick next relay randomly in single pass for now; change this to use shared secret after everything else is done

Chelsea H. Komlo 4 years ago
parent
commit
700e347ed0
1 changed files with 2 additions and 2 deletions
  1. 2 2
      relay.py

+ 2 - 2
relay.py

@@ -906,9 +906,9 @@ class RelayChannelManager(ChannelManager):
             self.path_selection_key, b'circuit', False, self.perfstats)
 
             logging.debug("RelayChannelManager: Unimplemented! need to translate idx into endive index")
+            logging.debug("RelayChannelManager: Unimplemented! need to pick the next relay using the shared secret between the client and the relay.")
 
-            sys.exit("TODO convert shared secret into integer type modulo alpha")
-            nexthop = self.relaypicker.pick_relay_by_uniform_index(idx)
+            nexthop = self.relaypicker.pick_weighted_relay()
             if nexthop == None:
                 logging.debug("WARNING: Unimplemented! Need to validate next hop is not null, if it is, we should send a CLOSE cell.")