summaryrefslogtreecommitdiff
path: root/crates/tor-netdir
Commit message (Collapse)AuthorAgeFilesLines
...
* | Add validation function to WeightSetNick Mathewson2021-09-081-1/+18
| | | | | | | | | | Our relay selection code can give wrong answers if we overflow u64::MAX, so let's make sure we never do that.
* | Replace weighted-choice code with rand::seq::SliceRandom.Nick Mathewson2021-09-083-231/+159
|/ | | | | | | | Doing this makes the code faster, lets us throw away some code, and makes it easier to add a "choose-N-disjoint relays" implementation. See large comment about plusses and minuses of new code. (Note that the old implementation wasn't constant-time either.)
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-279-0/+2684
This will cause some pain for now, but now is really the best time to do this kind of thing.