| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Now that choose_multiple_weighted can once more return
fewer items than requested, we should warn when it does so,
to be consistent with our other cases of warning about #1907.
|
| |
|
|
|
|
|
|
| |
Rand 0.9.1 reverted the changes that caused #1903,
in https://github.com/rust-random/rand/pull/1623.
This broke our test that made sure that rand wasn't going to change
their behavior _again_ :)
|
| |
|
|
|
| |
This name reflects its purpose better than the original one,
since it includes required protocols as well as recommended ones.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Instead of doing the more sensible thing when every relay has weight
0, give a warning message.
|
| |
|
|
|
|
| |
Here we test the (arguably inconsistent behavior) where can we
return fewer items than requested if no item had zero weight.
(If this ever becomes an error, we need to modify the calling code.)
|
| |
|
|
|
|
| |
WeightedError::InsufficientNonzero is expected under some
circumstances, but the other instances would mean that we have a
bug.
|
| |
|
|
|
| |
We want to make sure that behavior for 0-weighted elements is
consistent for choose_multiple_weighted and choose_weighted.
|
| |
|
|
| |
Possible fix for #1902.
|
| |
|
|
| |
- Several methods have been moved out of SliceRandom.
|
| |
|
|
| |
- The rand::distributions module has been renamed to rand::distr
|
| |
|
|
|
|
|
| |
This implements the client side of proposal 321.
It's a breaking change in netdir, since in_same_family now takes an
extra argument.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When we're trying to exclude relays by family,
we need to know which lists to look at.
This information ultimately comes from the network parameters.
We could avoid this change if we just told clients
"look at all family information all the time",
but that's not what the proposal says.
This is a breaking change.
|
| |
|
|
|
|
| |
Denies 'mod.rs' files for consistency.
https://rust-lang.github.io/rust-clippy/master/index.html#mod_module_files
|
| |
|
|
| |
These are new in Rust 1.83.
|
| |
|
|
|
|
|
|
| |
In 1.83, this warning triggers on many of our crates.
We're thinking of fixing them all, but for now,
we're going to disable the warning.
This is part of #1765.
|
| | |
|
| |
|
|
|
| |
These helpers seem potentially broadly useful, and only really
discoverable if they're here.
|
| |
|
|
|
| |
This allows us to set SRVs for example (needed because by default, the
test `NetDir` is built from a consensus that doesn't contain any SRVs).
|
| |
|
|
|
| |
This warning complains when we say `where T: SomeTrait + ?Sized`
when `SomeTrait` is inherently Sized.
|
| |
|
|
| |
This commit is automatically generated.
|
| |
|
|
|
| |
Previously they were a bit confusing, and the public function
explained its behavior in terms of the private one.
|
| |
|
|
|
|
|
| |
Explain that `by_ids` isn't what you want if you need to know
whether a relay _definitely_ doesn't exist.
Closes #1365
|
| | |
|
| |
|
|
| |
This was an open-coded specialisation. Remove the one call site.
|
| | |
|
| |
|
|
|
| |
Everybody outside of tor-netdir should use
HasRelayIds::same_relay_ids, whose intent is clearer.
|
| |
|
|
| |
These were only used for testing.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
In *RelayDetails, this is just a matter of changing a bunch of
`self`s to `self.0`.
Additionally, I've added temporary stub functions to delegate to the
new functions.
|
| |
|
|
| |
This is 99% code movement.
|
| |
|
|
|
|
|
|
|
|
| |
I'm going to use this wrapper type to hide checks
that should mostly not be used without careful thinking.
There are also comments here explaining when you'd want to use these
types, and when you shouldn't.
Part of #504.
|
| | |
|
| |
|
|
| |
We'll need this to implement restrictions more reasonably.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
This matches the behavior of C tor. Part of #1100.
|
| |
|
|
|
|
| |
This matches the behavior of C tor.
Part of #1100.
|
| | |
|
| |
|
|
| |
Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1904#note_2987777
|
| |
|
|
|
|
|
|
| |
The publisher is the only user of `hs_dirs_upload`. It turns out it
never actually uses the first element of the yielded `Item`s, so we can
simplify `hs_dir_upload` to only return the HsDir `Relay`s.
Part of #1166
|
| |
|
|
|
|
|
|
|
| |
The descriptor publisher uses this function to obtain the list of
relevant time periods. It will soon also need to know the `srv_lifespan`
associated with each time period, so we change this function to return
`HsDirParams`.
Part of #1166
|
| |
|
|
| |
Closes #1254.
|
| | |
|
| |
|
|
|
|
| |
This implements Relay::is_hs_intro_point.
Close #1240.
|