aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-dirmgr/src/storage.rs
Commit message (Collapse)AuthorAgeFilesLines
* arti-client: remove string slicesNick Mathewson2026-06-101-2/+1
|
* everywhere: Add #[allow(clippy::string_slice)]Clara Engler2026-06-091-0/+1
| | | | | | | | This commit adds #[allow(clippy::string_slice)] to all functions in the code where string slices are used, alongside a TODO comment. We do this add the function header to have it consistent, as things like expression based allow's are still experimental.
* 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.
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* dirmgr, netdir: Store protocol requirments as soon as they are validated.Nick Mathewson2025-04-161-2/+0
|
* dirmgr: Backend support for cacheing protocol status.Nick Mathewson2025-04-161-1/+13
| | | | | | | We want to store this separately from the consensus, because we want to access it very early in our load-from-cache process, without checking the consensus that contains it for timeliness.
* tor-dirmgr: Add some duplicate dead code allowsIan Jackson2024-07-081-2/+2
| | | | Sadly, rustc seems to want us to mark this allow in several places.
* DirMgr: Clarify dead_code status on storage methods.Nick Mathewson2024-05-141-2/+5
| | | | | | | | | Per comments on #1383, we're keeping these methods. This commit replaces the "TODO" comments with comments explaining why it's okay that this methods are unused. Part of #1383.
* Use the right feature name for an allow(dead_code).Nick Mathewson2024-05-071-1/+1
|
* Mark tor_dirmgr::storage::Store::consensus_by_meta cfg(test)Ian Jackson2024-04-251-0/+1
| | | | This seems to be used only in tests, since at least 2022.
* Add temporary allows for some dead code warningsIan Jackson2024-04-251-0/+2
|
* Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-231-0/+1
|
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+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/+8
| | | | | This is precisely the result of running the rune in maint/adhoc-add-lint-blocks.
* dirmgr Store: Abolish redundant trait implIan Jackson2022-11-141-108/+0
|
* dirmgr Store: Move Send and 'static bounds to Store traitIan Jackson2022-11-141-2/+2
| | | | | | | | This seems tidier to me. (It saved a lot of typing when I was trying to make some complicated pub supertrait with sealed private supertrait, but apparently not now.)
* bridge desc: Implement cache reuse logic and if-modified-sinceIan Jackson2022-11-041-0/+57
| | | | | | | | | | | | This introduces the new API functions to Store. But currently they are all no-ops. So all this machinery doesn't actually do anything. Also, it changes the API to the mockable downloader, to allow it to support if-modified-since. So this isn't used either. But it is more convenient to do this all at once in BridgeDescManager, since care needs to be taken about the intraction between if-modified-since and the persistent cache.
* Decrease the lifetimes for storing descriptors.Nick Mathewson2022-08-091-6/+29
| | | | | | | These values were chosen experimentally, based on those from Tor, to save disk space without wasting much bandwidth. Closes #527.
* dirmgr: Add an instance of BadUtf8InCacheNick Mathewson2022-07-141-2/+1
|
* dirmgr: Clarify disk IO errors.Nick Mathewson2022-07-141-1/+2
|
* Resolve DOCDOC comments in tor-dirmgr.Nick Mathewson2022-05-121-1/+5
|
* tor-dirmgr: small fixups for the bootstrapping refactoreta2022-05-101-0/+1
| | | | | | | - Some FIXMEs got removed or amended. - AddMicrodescs now yields a mutable reference, so we can use .drain() and reuse the allocation. - Some panics were downgraded to debug_asserts.
* tor-dirmgr/state.rs: refactor GetConsensusState::neweta2022-05-101-1/+1
| | | | | | | | | | | | | - GetConsensusState::new now takes a set of parameters matching what it actually needs, instead of just taking a writedir. (It still *does* take a writedir, and indeed still uses it for basically everything, but that will eventually go away.) - Its call sites were updated. - Some tests now need to take a runtime, and got indented a lot as a result. - Resetting was made non-functional, because we need to thread through the parameters passed to GetConsensusState to all of the other states, too. This will happen in a later commit.
* tor-dirmgr/storage.rs: impl Store for Box<dyn Store>eta2022-05-101-0/+87
| | | | | | | | | | | Annoyingly, Rust doesn't automatically generate this sort of `impl` for you, and I'd like to reduce the usage of Mutex<DynStore> everywhere else in favour of either &dyn Store or &mut dyn Store. (This is for two reasons: firstly, we might have a Store implementation that doesn't use a mutex as above, or similar refactors; secondly, passing the raw trait object reference lets us encode mutability into the function signature, which I believe is quite valuable.)
* Update tor-dirmgr to use fs-mistrust.Nick Mathewson2022-05-091-14/+8
|
* Fix grammar and typosSamanta Navarro2022-04-271-1/+1
|
* dirmgr::Store.expire_all takes configtharvik2022-02-231-1/+26
|
* dirmgr: add Store traittharvik2022-02-231-1/+94
|
* remember utf8 checkdagon2021-11-301-13/+51
|
* Remove useless into() conversions caught by clippy.Jani Monoses2021-10-181-1/+1
|
* fix/silence clippy lints in test modulesDaniel Eades2021-09-081-0/+1
|
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-271-0/+185
This will cause some pain for now, but now is really the best time to do this kind of thing.