aboutsummaryrefslogtreecommitdiff
path: root/tor-netdir/src
Commit message (Collapse)AuthorAgeFilesLines
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-277-2617/+0
| | | | | This will cause some pain for now, but now is really the best time to do this kind of thing.
* Simplify NetParameters::default()Nick Mathewson2021-08-271-49/+32
| | | | | Instead of loading it with expect() calls, make a new function that returns a Result, and call expect() only once.
* Tweaks on patch to add clippy::unwrap_used lint.Nick Mathewson2021-08-271-1/+1
| | | | | | | The most frequent changes are: - Rewording messages about poisoned locks - Correcting some error types
* Change `unwrap` to `expect` with messageS0AndS02021-08-251-20/+37
| | | | | | > Note, while `cargo fmt` doesn't complain I think this section could be > prettier. Also it may be a good idea to have tests double-check that future > changes don't cause a panic condition.
* Move "use_unwrap" lint from some to want listS0AndS02021-08-251-1/+2
| | | | | | | | And convert some `add_or_port` calls to use `SocketAddr` instead of parse + unwrap on strings. > Note, this last change is only for IPv4 addresses, for now, and only > within tests.
* WIP: Add the "unwrap_used" lint.S0AndS02021-08-244-21/+30
| | | | | | | | | | | | | | | | | > Check `unwrap_used` section of Clippy documentation for details; > > https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used This adds the following Clippy configuration to crates; #![deny(clippy::unwrap_used)] **Warning** while tests and compiler do not show any errors, the submitted changes are very much a Work In Progress and mistakes may have been made. Check https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/67 Merge Request thread for more details.
* Switch all uses of the log crate to the tracing.Jani Monoses2021-08-201-1/+1
| | | | Issue #74
* Fix a few things that the "typos" tool didn't like.Nick Mathewson2021-08-201-15/+15
|
* Document panics in tor-netdir::testnet.Nick Mathewson2021-08-181-5/+7
|
* Revisions based on new documented-panics lint.Nick Mathewson2021-08-181-0/+5
| | | | | I've tried to remove some of possible panics, and improve the documentation for when the others might occur.
* Merge remote-tracking branch 'origin/mr/60'Nick Mathewson2021-08-181-0/+1
|\
| * Add the "missing_panics_doc" lint.S0AndS02021-08-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | > Check `missing_panics_doc` section of Clippy documentation for details; > > https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc This adds the following Clippy configuration to crates; #![deny(clippy::missing_panics_doc)] And adds necessary doc-comments to methods that may panic.
* | Merge remote-tracking branch 'origin/mr/61'Nick Mathewson2021-08-181-0/+1
|\ \
| * | Add the "implicit_clone" lint.S0AndS02021-08-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > Check `implicit_clone` section of Clippy documentation for details; > > https://rust-lang.github.io/rust-clippy/master/index.html#implicit_clone This adds, and addresses, the following Clippy configuration to crates; #![deny(clippy::implicit_clone)] And moves related line within `maint/add_warning.py` file. My intent is to mitigate extra edits after merging, so please let me know if I need to do this last bit differently.
* | | More tests for tor_netdir, plus a bugfix and a little refactoring.Nick Mathewson2021-08-171-34/+84
| | | | | | | | | | | | | | | | | | (While messing around with test coverage on `in_same_subnet`, I found that there was a copy-paste error where we were using v4_bits when v6_bits would have been appropriate.)
* | | Make construct_netdir() return a PartialNetDir.Nick Mathewson2021-08-172-6/+8
| | | | | | | | | | | | | | | This way we can still use it even if we've removed too many microdescriptors to make a real network.
* | | Test Netdir behavior with BadExit flag.Nick Mathewson2021-08-171-2/+60
| | |
* | | Re-work the test network generator to take a customization function.Nick Mathewson2021-08-171-17/+104
|/ /
* / Update tor-netdir path fractions to avoid NaN.Nick Mathewson2021-08-161-15/+34
|/
* Use add_warnings.py for clippy::cast_losslessNick Mathewson2021-08-131-1/+1
|
* Add the "cast_lossless" lint.S0AndS02021-08-123-4/+5
| | | | | | | | | | | | > Check `cast_lossless` section of Clippy documentation for details; > > https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless This adds the following Clippy configuration to crates; #![deny(clippy::cast_lossless)] And applies suggested Clippy and `cargo fmt` fixes.
* Use real network parameter values to tune test circuits.Nick Mathewson2021-08-121-3/+17
| | | | Finishes #145.
* Add functions to check whether port policies are nonempty.Nick Mathewson2021-08-111-1/+19
|
* Use real network parameters to set unused-circ timeouts.Nick Mathewson2021-08-101-2/+22
|
* Add unnecessary_wraps to the big warning list.Nick Mathewson2021-08-061-0/+1
|
* Small cleanups and tweaks to same_subnet code.Nick Mathewson2021-08-051-35/+30
|
* Merge remote-tracking branch 'origin/mr/45'Nick Mathewson2021-08-052-5/+80
|\
| * Support EnforceDistinctSubnetsSmitty2021-08-012-5/+80
| | | | | | | | | | Relays on the same IPv4 /16 or IPv6 /32 are treated as being in the same family.
* | Revert spelling change; "recognised" is validrls2021-07-311-1/+1
| |
* | Fix typos and other spelling mistakesrls2021-07-314-10/+10
|/
* address some possibly slightly controversial lintsDaniel Eades2021-07-211-6/+3
|
* address a bunch of hopefully uncontroversial lintsDaniel Eades2021-07-202-3/+2
|
* Implement consensus parameters related to circuit timeout inference.Nick Mathewson2021-07-191-0/+74
|
* cleanlinessTrinity Pointard2021-07-101-11/+8
|
* make ipv[46]_policy take into account BadExitTrinity Pointard2021-07-101-10/+30
| | | | they now report an empty policy for BadExit relays
* Rename "send_me_*" to "sendme_*"Nick Mathewson2021-07-061-9/+9
|
* Add clippy warn needless pass by valueYUAN LYU2021-06-211-0/+1
|
* Add clippy warn needless borrowYUAN LYU2021-06-211-0/+1
|
* Fix some warnings about needless & from nightly clippyNick Mathewson2021-06-182-4/+4
|
* Notes about badexit flag and opportunities for errorNick Mathewson2021-06-161-0/+4
|
* Tests for circmgr::usageNick Mathewson2021-06-162-5/+21
|
* Expose the "construct_network()" function in tor-netdir.Nick Mathewson2021-06-162-77/+136
| | | | | | | | This function has been used for testing tor-netdir, but it will also be useful for testing path selection in tor-cirmgr as well. I've put it behind a "testing" feature, since it shouldn't really be used by most applications.
* Add noop_method_call warning.Nick Mathewson2021-05-271-0/+1
| | | | | | This would have saved ahf and me a lot of confusion in debugging a situation where we were cloning a reference of a type that didn't implement Clone.
* Use the "typos" tool to fix some spellingNick Mathewson2021-05-261-1/+1
|
* Enable cargo_common_metadata warning.Nick Mathewson2021-05-251-0/+2
|
* Re-add a percentage type wrapper.Nick Mathewson2021-05-252-12/+11
| | | | | | It turns out that when we don't have a percentage type associated with a value, it is far too easy to forget to divide by 100 before using it as a fraction.
* fixup! Revert change to type of NetParams value.Nick Mathewson2021-05-251-4/+0
|
* Remove a needless lifetime.Nick Mathewson2021-05-251-1/+1
|
* Remove the no-longer-used params::ErrorNick Mathewson2021-05-251-25/+0
|
* Documentation fix.Nick Mathewson2021-05-251-5/+6
|