| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
| |
This is part of abolishing the use of "ns" to mean "plain".
|
| |
|
|
| |
Not sure how this is needed now, after rebase, but whatever.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
It's not clear why this method exists, but I'm not tidying this up
now.
|
| | |
|
| |
|
|
| |
And add a blocking todo about renaming it.
|
| |
|
|
| |
This reverts commit 084ad9a716da8e44616a54fdfbba0140f5a7704e.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3139#note_3238496
|
| | |
|
| | |
|
| |
|
|
|
|
| |
We don't need this now; we can just write the impl in per_species.rs.
Formatting will be fixed in a moment.
|
| |
|
|
|
|
|
| |
These two files were largely identical.
Move the common text to per_species.rs, and fix a couple of imports so
that it still compiles.
|
| |
|
|
|
|
|
| |
Not having the flavour in the type name is a shame, but we probably
don't want to resort to generating the docs with macros.
Part of making these two files largely identical.
|
| |
|
|
| |
Part of making these two files largely identical.
|
| |
|
|
|
| |
Move the implementation to the trait method which then becomes
completely identical in both files.
|
| |
|
|
| |
Part of making ns.rs and md.rs largely identical.
|
| |
|
|
| |
Part of making these two files largely identical.
|
| |
|
|
|
|
|
| |
In the species-specific files ns.rs and md.rs, use the unqualified
name; re-export it with the new macro.
We are working towards making these two files largely identical.
|
| |
|
|
|
| |
This will let us deduplicate a fair amount of code, and also will let
us support votes as well as ns and md consensuses.
|
| | |
|
| |
|
|
| |
Cut-and-paste error, I think.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
First, run
```
git grep -l "^edition =" |
xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;'
```
Second, manually verify that all Cargo.toml files have changed,
and nothing else has changed.
Third, run cargo fmt again.
|
| |
|
|
|
|
| |
> The actual impact of this patch is to prevent usage of MiddleOnly
> relays as Introduction Points. The Rendezvous Point logic isn't
> hooked up yet - nick
|
| | |
|
| |
|
|
|
| |
We'll want this so that we can expose them before we expose the rest
of the consensus (which we need to do for spec conformance).
|
| | |
|
| |
|
|
| |
(For testing.)
|
| |
|
|
|
| |
(We don't need Fast right now, but we will certainly need it down
the line.)
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
`ParseErrorSource` was originally meant to represent a parsing error,
this enum has since gained some variants that aren't really parsing
related (`Signature`, `CertSignature`, `UntimelyDescriptor`).
Since this error type is now used for general-purpose netdoc errors,
let's rename `ParseError{Kind, Source}` to `NetdocError{Kind, Source}`.
Signed-off-by: Gabriela Moldovan <[email protected]>
|
| |
|
|
| |
Clarify that it isn't anything that most users will need to check.
|
| |
|
|
| |
Closes #833
|
| |
|
|
|
|
| |
* Provide an accessor for the HSDIR flag
* Provide a function for testing a relay for hsdir inclusion
* Provide an iterator on NetDir that returns the hsdirs
|
| |
|
|
|
| |
This breaks some experimental APIs, but since they are experimental
no semver note is needed.
|
| |
|
|
|
| |
This panics on error, and we're fine with a panic on misbehavior in
tests.
|
| |
|
|
|
|
|
|
| |
SharedRandVal now holds only the 32-byte random value itself; the
"number of commits" field is in SharedRandStatus.
This commit also makes the SharedRandVal be exactly 32 bytes, since
we've set it to that value in the spec.
|
| |
|
|
|
| |
This is precisely the result of running the rune in
maint/adhoc-add-lint-blocks.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The warning `clippy::bool_to_int_with_if` is meant to shout at you
when you say `if x { 1 } else { 0 }` and instead suggest that you
say `inttype::from(x)`.
I agreed with this for the case in tor-cert, where we are literally
converting a boolean into a flag.
I don't agree with this in tor-netdoc, where we are using a boolean
to decide how many fields to skip in a given document format. So
for this case, I decided to clean up the code a little by renaming
"skip" to "n_skip", and changing the boolean to use an enum instead.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Relay nicknames are always between 1 and 19 characters long, and
they're always ASCII: That means that storing them in a [u8;19] will
always be possible, and always use less resources than storing them
in a String.
Fortunately, the tinystr crate already helps us with this kind of
thing.
|
| |
|
|
|
| |
Remove all `use` statements for `TryFrom` and `TryInto`. These are
now redundant in Rust 2021.
|
| | |
|
| |
|
|
|
|
|
|
| |
This commit uses the `visibility` and `visible` crates to
conditionally make certain structs and their fields public
(respectively). This is incredibly dangerous to use for anything
besides testing, and I've tried to write the documentation for the
feature accordingly.
|