summaryrefslogtreecommitdiff
path: root/crates/tor-dirmgr/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'config-updates-and-tests'Nick Mathewson2021-11-292-1/+2
|\
| * Add basic tests for high-level buildersNick Mathewson2021-11-252-1/+2
| | | | | | | | | | Make sure that we can change elements, and we can reconstruct builders that give us the same thing.
* | add semicolons if nothing returnedDaniel Eades2021-11-254-9/+10
| |
* | deglob some enums, use concise iteration syntaxDaniel Eades2021-11-252-2/+2
|/
* More typo fixes that I forgot to save :(Nick Mathewson2021-11-242-2/+2
|
* Make every Config type implement Eq.Nick Mathewson2021-11-212-4/+4
| | | | | Doing this is necessary for reconfiguration support, and will help a lot with testing, too.
* Give every ConfigBuilder a From<Config> implementation.Nick Mathewson2021-11-211-6/+25
| | | | This will make it more convenient to reconfigure things.
* Use named fields for the elements of ConfigBuildErrorNick Mathewson2021-11-181-4/+4
|
* Rename RetryConfig to DownloadSchedule, fold in parallelism.Nick Mathewson2021-11-185-79/+83
|
* Move top-level configuration downwards from `arti` to `arti-config`.Nick Mathewson2021-11-181-5/+9
| | | | | | | | To do this at all neatly, I had to split out `tor-config` from `arti-config` again, and putting the lower level stuff (paths, builder errors) into tor-config. I also changed our use of derive_builder to always use a common error type, to avoid error type proliferation.
* tor-dirmgr: put routerdesc storage behind a feature.Nick Mathewson2021-11-123-23/+62
| | | | | | | (We keep routerdescs in the schema, since we don't want _that_ to fragment.) Part of #125.
* Fix typosDimitris Apostolou2021-11-122-3/+3
|
* Remove usage of tracing-test 0.1Nick Mathewson2021-11-111-2/+0
| | | | | | | | It requires tracing-subscriber 0.2, which is a lower version than we want, and which causes trouble with our minimal-versions CI test. There is a pending issue to fix this; we can reinstate tracing-test once it is merged: https://github.com/dbrgn/tracing-test/pull/11
* Tests for tor-dirmgr::bootstrapNick Mathewson2021-11-112-1/+216
|
* Minor tests for DirMgr::query_into_requestsNick Mathewson2021-11-111-0/+39
|
* tor-dirmgr: tests for making and expanding consensus requests.Nick Mathewson2021-11-101-0/+125
|
* tor-dirmgr: Tests for high-level loading functions.Nick Mathewson2021-11-101-3/+152
|
* More tests on tor-dirmgr::stateNick Mathewson2021-11-083-27/+113
| | | | | These test our download schedules, resetting to the original state, and storing downloaded objects.
* Remove one more test println!().Nick Mathewson2021-11-041-1/+0
|
* tor-dirmgr: tests for docid module.Nick Mathewson2021-11-041-1/+156
|
* Remove some dbg!() calls in real code.Nick Mathewson2021-11-021-1/+0
|
* Try writing a bit more documentation for configuration types.Nick Mathewson2021-10-281-2/+13
|
* tor-dirmgr: tests for GetMicrodescsStateNick Mathewson2021-10-281-0/+100
|
* tor-dirmgr: tests for download schedules.Nick Mathewson2021-10-281-0/+23
|
* tor-dirmgr: Test for GetCertsStateNick Mathewson2021-10-281-5/+115
|
* tor-dirmgr: Tests for GetConsensusState.Nick Mathewson2021-10-281-0/+148
| | | | | | This test uses a consensus that I've copied from tor-netdoc/testdata. I would include it directly, but I think that will cause trouble when it comes time to run "cargo package".
* tor-dirmgr::state: Mock the view of current time.Nick Mathewson2021-10-281-3/+25
| | | | | This will let us test the state processing code without having to give it up-to-date directory objects.
* Upgrade to fslock version 0.2Nick Mathewson2021-10-271-1/+1
| | | | | This version makes all locks per-handle rather than per-process, by moving from lockf() to flock() on unix.
* Migrate tor-dirmgr from chrono to time 0.3Nick Mathewson2021-10-242-34/+38
| | | | | (This appears to be the emerging consensus of how to handle RUSTSEC-2020-0159.)
* Replace references to arti-client in the documentation.Nick Mathewson2021-10-211-2/+2
|
* Remove #![allow(unreachable_pub)] in shared_ref.rsNick Mathewson2021-10-211-7/+5
|
* Merge branch 'share_state'Nick Mathewson2021-10-213-53/+84
|\
| * Mark consensus as "not-pending" even if its microdescs come from cache.Nick Mathewson2021-10-203-8/+48
| | | | | | | | | | | | | | Previously our code would clear the 'pending' flag on a consensus only when a _downloaded_ md made it become usable. Closes #199.
| * Move tor-dirmgr to use a sync::Mutex.Nick Mathewson2021-10-203-45/+36
| | | | | | | | | | The futures::lock::Mutex was unnecessary, since we never held it when we were suspending.
* | fallbackdir: Regenerate list for October 2021David Goulet2021-10-211-881/+870
| | | | | | | | | | | | Closes #200 Signed-off-by: David Goulet <[email protected]>
* | Fix most warnings from nightly.Nick Mathewson2021-10-193-3/+9
|/ | | | (One represents code that I forgot to write.)
* Fix some typos in comments.Nick Mathewson2021-10-191-1/+1
| | | | Also, tell the "typos" tool to ignore Cargo.lock.
* Reverse two swapped log messagesNick Mathewson2021-10-191-2/+2
|
* Improve logging when trying to get the lock on the directory cache.Nick Mathewson2021-10-191-3/+20
| | | | | | Previously we'd say that we were "waiting for the other process to bootstrap" even if it was already bootstrapped: and we wouldn't actually declare success when it was done.
* Remove useless into() conversions caught by clippy.Jani Monoses2021-10-185-28/+30
|
* Remove anyhow dependency from tor-dirmgr.Jani Monoses2021-10-183-12/+61
|
* Use unwrap in tests.Jani Monoses2021-10-181-9/+15
| | | | | | | | | For now, this avoids having to separately handle AuthorityBuilderError, DirMgrConfigBuilderError, DownloadScheduleConfigBuilderError, NetworkConfigBuilderError and FallbackDirBuilderError when anyhow is not used. Turn off a clippy warning.
* Add a few tracing directives to tor-dirmgr.Nick Mathewson2021-10-133-3/+14
|
* tor-dirmgr: report bootstrap success on all successful cases.Nick Mathewson2021-10-131-0/+5
| | | | | Previously we would sometimes fail to report that we had successfully bootstrapped.
* Don't report the bootstrap as completed unless it actually succeeds.Nick Mathewson2021-10-132-5/+14
| | | | | (Previously we'd report it as successful even if the inner download task was a failure.)
* Notify guard manager on network change and state flush.Nick Mathewson2021-10-103-0/+26
|
* Lock down some dirmgr config functions.Nick Mathewson2021-10-091-11/+11
|
* Re-export configuration types from tor-client.Nick Mathewson2021-10-092-1/+7
|
* enable checked_conversions lint.Nick Mathewson2021-10-091-0/+1
|
* Fix a type inference complaint in tor-dirmgr's tests.Nick Mathewson2021-10-071-1/+1
| | | | I have no idea why this just turned up now.