aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdir/src/testnet.rs
Commit message (Collapse)AuthorAgeFilesLines
* Remove renaming aliases for MicrodescAndHashIan Jackson2026-06-221-4/+4
|
* tor-netdoc: Break Microdesc up into Microdesc and MicrodescAndHashIan Jackson2026-06-221-1/+1
| | | | | | | | | | | | | The Microdesc type having a copy of the document hash was always weird, and it's weirder now that there's all these parse2 types that don't have it and parse2 derives on Microdesc that don't touch it. Make a new type for the descriptor and its hash. Use deref to arrange that the new type works almost like the old one. Adjust the use lines in the dependencies to temporarily import MicrodescAndHash as Microdesc.
* maint: Run maint/add_warning to deny string slicesClara Engler2026-06-091-0/+1
| | | | | | | | | | | | This commit executes maint/add_warning with the just added change to deny string slices except in tests. I recommend auditing this by checking out the previous commit followed by running the script yourself and then verifying that the diff is identical to this commit. This commit makes cargo clippy fail. We will add exceptions in the next commit.
* tor-netdir: port to web-time-compat.Nick Mathewson2026-03-261-2/+2
|
* RelayFlags: Use RelayFlag enum variant names everywhereIan Jackson2025-11-181-10/+10
| | | | | | | Abolish the constants with the transitional names. This also abolishes the controversial name `H_S_DIR`, which Rust case transformation rules generated from `HSDir`.
* RelayFlags: Use the singular RelayFlag for naming individual flagsIan Jackson2025-11-181-11/+11
| | | | | | | | | | | | | | We're going to separate RelayFlag from RelayFlags. We could continue to provide a bunch of constant values for RelayFlags, for each individual type, but that would involve an ad-hoc derive, and would still be a bit of an unusual API. Instead, we're going to make ``RelayFlag` a normal enum. In this commit, we change everyone to refer to it by its singular name. Hopefully separating out this bulk change makes both this, and the core commit, easier to review.
* tor-netdoc: Remove the RelayFlags type alias in netstatusIan Jackson2025-11-181-2/+2
| | | | I would do `#[deprecated]` but empirically that has no effect...
* tor-netdoc: Rename RelayFlags elements for regularity vs specIan Jackson2025-11-181-2/+2
| | | | | Add underscores so that the spec keywords and the flag constants correspond (according to `paste`'s case-changing rules).
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* tor-netdoc: Apply much rustfmt churnIan Jackson2025-08-261-8/+3
|
* tor-netdoc: Remove generics from Consensus and its contentsIan Jackson2025-08-261-9/+9
|
* tor-netdoc: netstatus: Move everything variety-specificIan Jackson2025-08-261-10/+10
| | | | | | | | | This is much code motion. This splits many types into two. For example, `Conensus` is now`plain::Consensus<RS>` and `md::Consensus<RS>`. We're going to get rid of the generics later in this branch.
* tor-netdir: Allow access to the `ConsensusBuilder` when building test ↵Gabriela Moldovan2024-09-091-1/+6
| | | | netdirs (fmt).
* tor-netdir: Allow access to the `ConsensusBuilder` when building test netdirs.Gabriela Moldovan2024-09-091-9/+9
| | | | | 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).
* Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|
* netdir: flag every testnet relay as Fast and StableNick Mathewson2024-01-161-1/+5
| | | | | As we enforce these flags in more places, it will be handy for our default network to have them for its relays.
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-231-0/+1
|
* Add country codes to relays inside a NetDireta2023-07-131-0/+40
| | | | | | | | | | | | - When the `geoip` feature flag of `tor-netdir` is enabled, perform GeoIP lookups for all relays added to the directory and add the resulting country code to the `Relay` struct. - The GeoIP database is provided in a new `PartialNetDir::new_with_geoip` constructor. - A new trait was also added to `tor-linkspec`, `HasCountryCode`, to enable getting this data out from other crates. Part of onionmasq#47.
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|
* Remove explicit allows for missing_panics_docs.Nick Mathewson2023-07-061-1/+0
| | | | These are no longer needed.
* tor-netdir: Update tests to parse the descriptor, make test consensus ↵Gabriela Moldovan2023-05-031-8/+17
| | | | | | lifetime configurable. Signed-off-by: Gabriela Moldovan <[email protected]>
* tor-netdir: testnet: Make all non-guard non-exits be hsdirsIan Jackson2023-04-051-1/+1
|
* Allow clippy::unchecked_duration_subtraction in testsNick Mathewson2023-01-271-0/+1
| | | | | This panics on error, and we're fine with a panic on misbehavior in tests.
* test lint blocks: Add many many automaticallyIan Jackson2022-12-121-0/+9
| | | | | This is precisely the result of running the rune in maint/adhoc-add-lint-blocks.
* fix clippy::needless_borrowtrinity-1686a2022-09-101-1/+1
|
* tor-netdir: testnet: construct_custom_netdir_with_params: Fix docIan Jackson2022-08-171-1/+2
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826168
* tor-netdir, testnet: Provide construct_custom_netdir_with_paramsIan Jackson2022-08-161-2/+16
| | | | | We're going to want this for testing netdirs with padding parameters that diff ere from the spec's default.
* tor-netdir: testnet: Make construct_netdir infallibleIan Jackson2022-06-131-2/+2
| | | | | This is a *lot* of unwraps. The function takes no parameters and is used only for testing. It ought to be infallible.
* Remove allow(clippy::disallowed_methods) lint.Nick Mathewson2022-03-301-1/+0
|
* use wallclock where possible in teststrinity-1686a2022-02-261-0/+1
|
* tor-netdir: Split testnet errors into a new typeNick Mathewson2022-02-151-6/+9
| | | | | There's no reason to have the test-network-construction code share an error enum with the main netdir code.
* Merge remote-tracking branch 'origin/mr/151'Nick Mathewson2021-11-301-12/+0
|\
| * Remove unused tap_onion_key and tap_keyNeel Chauhan2021-11-281-12/+0
| |
* | add semicolons if nothing returnedDaniel Eades2021-11-251-1/+1
|/
* tor_netdir::testnet: Correct a documentation error.Nick Mathewson2021-09-291-1/+1
|
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-271-0/+238
This will cause some pain for now, but now is really the best time to do this kind of thing.