summaryrefslogtreecommitdiff
path: root/tor-netdir/src/weight.rs
Commit message (Collapse)AuthorAgeFilesLines
* Fix some warnings about needless & from nightly clippyNick Mathewson2021-06-181-1/+1
|
* Revert change to type of NetParams value.Nick Mathewson2021-05-251-1/+1
| | | | | This truly is an i32, not a strings: it is a specified requirement in parsing consensus documents.
* Use macros and types to improve handling of Netdir parameters.Nick Mathewson2021-05-251-2/+3
| | | | (Squashed from typed-netdir-params)
* Prefer "relay" over "node" in most circumstances.Nick Mathewson2021-05-181-14/+14
|
* Prefer "relay" over "router" in docs and APIs.Nick Mathewson2021-05-181-42/+39
|
* netdir: Add real tests for frac_for_role().Nick Mathewson2021-05-101-0/+4
| | | | | Also fix a bug in calculating have_enough_paths(): we were assuming the wrong behavior for weight_for_role().
* More tests for tor-netdir::weightNick Mathewson2021-05-071-0/+86
|
* Fix documentation warnings.Nick Mathewson2021-05-051-1/+1
|
* Enforce (and obey) clippy lints about exhaustive enums, structs.Nick Mathewson2021-04-271-0/+2
| | | | | | | | These lints force us to declare our exported enums and exhaustive-looking structs as non-exhaustive (so that we can add to them in the future without breaking our API) or to explicitly disable the warning for a given enum/struct (to say that we _intend_ for additions to be a breaking change).
* Fix Rust-1.51 clippy warnings about acronyms in camel case.Nick Mathewson2021-03-291-5/+5
| | | | This is painful, but we shouldn't have to do it again.
* Resolve unwrap() instances in tor-netdir.Nick Mathewson2021-03-161-1/+2
| | | | | This includes revising the pick_weighted() function to not panic if its inputs are above 2^64 in total.
* Expose network parameters more sensibly from NetDir.Nick Mathewson2020-12-221-6/+7
|
* Use uniform weight all measured weights are zero.Nick Mathewson2020-12-071-9/+13
|
* Mark some XXXX issues as XXXX-A1.Nick Mathewson2020-12-071-1/+1
|
* A few more tests for role-based weightingNick Mathewson2020-12-021-0/+36
|
* Use bwweightscale to avoid miscalculating weights for v2dir relaysNick Mathewson2020-12-021-16/+32
|
* More tests for weight.rs; find a bug.Nick Mathewson2020-12-021-1/+44
|
* Add a few easy tests in weights.rsNick Mathewson2020-12-021-1/+55
|
* a little more refactoring for testabilityNick Mathewson2020-12-021-7/+13
|
* Clarify DFLT_WEIGHT in weights.rsNick Mathewson2020-12-021-1/+4
|
* Resolve a couple of TODOs in weight.rsNick Mathewson2020-12-021-3/+4
| | | | (Thanks to Mike Perry for answers here.)
* weights: refactor a couple of functions to be more testable.Nick Mathewson2020-12-021-5/+14
|
* Use a slightly prettier syntax in max_weightNick Mathewson2020-12-021-1/+2
|
* Fix a few comments in weight.rsNick Mathewson2020-12-021-12/+17
|
* Implement correct (?) weighting for path selection.Nick Mathewson2020-12-021-0/+351