Jani Monoses
44d1271c86
Switch all uses of the log crate to the tracing.
...
Issue #74
2021-08-20 21:10:50 +03:00
Nick Mathewson
92501895fd
Fix a few things that the "typos" tool didn't like.
2021-08-20 12:11:28 -04:00
Nick Mathewson
cd202f48a7
Document panics in tor-netdir::testnet.
2021-08-18 10:11:50 -04:00
Nick Mathewson
341e3937b4
Revisions based on new documented-panics lint.
...
I've tried to remove some of possible panics, and improve the
documentation for when the others might occur.
2021-08-18 09:55:39 -04:00
Nick Mathewson
fe5d826942
Merge remote-tracking branch 'origin/mr/60'
2021-08-18 08:53:11 -04:00
Nick Mathewson
6895bc58f3
Merge remote-tracking branch 'origin/mr/61'
2021-08-18 08:49:19 -04:00
Nick Mathewson
9a9c8151e2
More tests for tor_netdir, plus a bugfix and a little refactoring.
...
(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.)
2021-08-17 16:42:21 -04:00
S0AndS0
484cc24856
Add the "implicit_clone" lint.
...
> 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.
2021-08-17 11:49:39 -07:00
Nick Mathewson
a484d911a8
Make construct_netdir() return a PartialNetDir.
...
This way we can still use it even if we've removed too many
microdescriptors to make a real network.
2021-08-17 14:28:02 -04:00
Nick Mathewson
46519d87d7
Test Netdir behavior with BadExit flag.
2021-08-17 14:24:31 -04:00
Nick Mathewson
1a65448eb5
Re-work the test network generator to take a customization function.
2021-08-17 14:24:31 -04:00
Nick Mathewson
910f0bf556
Update tor-netdir path fractions to avoid NaN.
2021-08-16 12:19:42 -04:00
S0AndS0
b5a58f5871
Add the "missing_panics_doc" lint.
...
> 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.
2021-08-13 15:11:04 -07:00
Nick Mathewson
9c6dd27ca1
Use add_warnings.py for clippy::cast_lossless
2021-08-13 11:36:14 -04:00
S0AndS0
657e7b2246
Add the "cast_lossless" lint.
...
> 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.
2021-08-12 17:25:15 -07:00
Nick Mathewson
cac8c29abd
Use real network parameter values to tune test circuits.
...
Finishes #145 .
2021-08-12 10:45:51 -04:00
Nick Mathewson
b4bb082153
Add functions to check whether port policies are nonempty.
2021-08-11 12:32:21 -04:00
Nick Mathewson
cb9319c468
Use real network parameters to set unused-circ timeouts.
2021-08-10 10:46:31 -04:00
Nick Mathewson
79d9eac58c
Add unnecessary_wraps to the big warning list.
2021-08-06 16:20:37 -04:00
Nick Mathewson
e4baf164dd
Small cleanups and tweaks to same_subnet code.
2021-08-05 15:16:03 -04:00
Nick Mathewson
3bc0a03848
Merge remote-tracking branch 'origin/mr/45'
2021-08-05 14:59:34 -04:00
Smitty
3100a6a6ae
Support EnforceDistinctSubnets
...
Relays on the same IPv4 /16 or IPv6 /32 are treated as being in the same
family.
2021-08-01 19:01:06 -04:00
rls
297ca28170
Revert spelling change; "recognised" is valid
2021-07-31 18:21:18 +02:00
rls
51d91508f7
Fix typos and other spelling mistakes
2021-07-31 18:02:35 +02:00
Daniel Eades
ed14a7fcf2
address some possibly slightly controversial lints
2021-07-21 07:27:26 +01:00
Daniel Eades
d23256074e
address a bunch of hopefully uncontroversial lints
2021-07-20 22:59:59 +01:00
Nick Mathewson
379c28b2a8
Implement consensus parameters related to circuit timeout inference.
2021-07-19 12:25:26 -04:00
Trinity Pointard
ed0b51b557
cleanliness
2021-07-10 03:10:19 +02:00
Trinity Pointard
676577c184
make ipv[46]_policy take into account BadExit
...
they now report an empty policy for BadExit relays
2021-07-10 02:38:41 +02:00
Nick Mathewson
3a38d4ff7b
Rename "send_me_*" to "sendme_*"
2021-07-06 12:34:02 -04:00
Nick Mathewson
1c21295d19
Merge remote-tracking branch 'origin/mr/34'
2021-06-27 14:30:49 -04:00
Nick Mathewson
2df9b0e921
Bump version dependencies to 0.0.0
2021-06-24 09:27:17 -04:00
Nick Mathewson
b774360755
Remove "publish = false"
2021-06-24 07:04:26 -04:00
YUAN LYU
92dbf20a76
Add clippy warn needless pass by value
2021-06-21 23:27:19 -04:00
YUAN LYU
b830e81b7f
Add clippy warn needless borrow
2021-06-21 21:34:40 -04:00
Nick Mathewson
e6faeaa1f8
Fix some warnings about needless & from nightly clippy
2021-06-18 07:19:24 -04:00
Nick Mathewson
9310273448
Remove some (but not all) needless dependencies.
2021-06-17 09:09:43 -04:00
Nick Mathewson
321fd79632
Notes about badexit flag and opportunities for error
2021-06-16 15:10:26 -04:00
Nick Mathewson
a9086fd139
Missing feature dependency.
2021-06-16 11:40:19 -04:00
Nick Mathewson
d3f27716d9
Tests for circmgr::usage
2021-06-16 11:36:50 -04:00
Nick Mathewson
b6da4bb11a
Expose the "construct_network()" function in tor-netdir.
...
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.
2021-06-16 10:58:48 -04:00
Nick Mathewson
2102d2e2b5
Add noop_method_call warning.
...
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.
2021-05-27 14:32:29 -04:00
Nick Mathewson
7f681ac824
Use the "typos" tool to fix some spelling
2021-05-26 19:18:35 -04:00
Nick Mathewson
745c90e92c
Enable cargo_common_metadata warning.
2021-05-25 15:42:47 -04:00
Nick Mathewson
cf59e9be77
Add automatically generated README.md files to each crate.
2021-05-25 15:41:23 -04:00
Nick Mathewson
63e4db3ceb
tor-netdir no longer uses caret.
2021-05-25 11:25:19 -04:00
Nick Mathewson
88e711b282
Re-add a percentage type wrapper.
...
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.
2021-05-25 11:21:11 -04:00
Nick Mathewson
6a8cce95f0
fixup! Revert change to type of NetParams value.
2021-05-25 11:00:45 -04:00
Nick Mathewson
3e0a235fba
Remove a needless lifetime.
2021-05-25 10:58:55 -04:00
Nick Mathewson
89bdf6f1d8
Remove unused derive_more.
2021-05-25 10:58:13 -04:00