aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-circmgr/src/timeouts.rs
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* circmgr: Document caveats about BuildCircuit estimatorNick Mathewson2026-05-071-0/+11
| | | | | There's no reason that the next person should have to rediscover these caveats.
* circmgr: Modernize and correct saturating_mul_f64Nick Mathewson2026-05-071-19/+23
| | | | | | | | | | | | | | Duration::try_from_secs_f64 has existed since Rust 1.66, so we can use it now. It seems wrong to treat "infinity" and "negative infinity" as "one second", so make them actually saturating. Additionally, document behavior for infinity and negative infinity, and document that the NaN behavior isn't documented. (And secretly NaN behavior return a number on the same order of magnitude as the input.)
* circmgr: Avoid half-steps in our timeout_scale calculationNick Mathewson2026-05-071-12/+23
| | | | | This strategy is safe because (outside of our tests) we never look at the actual values of timeout_scale, but only at their ratios.
* circmgr, hsclient: Introduce and use a OneWay timeout estimator.Nick Mathewson2026-05-071-0/+10
|
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* 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
|
* circmgr: Now that Action is public, clean it up a little.Nick Mathewson2023-06-221-3/+2
|
* circmgr: New API to expose estimate-based timeouts.Nick Mathewson2023-06-221-1/+1
| | | | | This will help create good timeout values for various onion-service operations.
* 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.
* Resolve an XXXX: timeout scaling _is_ documentedNick Mathewson2021-12-081-1/+2
|
* Use a panic-free function to multiply timeouts.Nick Mathewson2021-12-061-1/+57
| | | | | | | | | Previously we used Duration::mul_f64, which panics if its output is out-of-range. That shouldn't actually be possible for the values we're giving it, but probably it's better to just multiply in a safe way. This resolves a couple of XXXXs and therefore relates to #231.
* Resolve roughly half of the XXXXs.Nick Mathewson2021-12-061-1/+2
| | | | | | | | We want to only use TODO in the codebase for non-blockers, and open tickets for anything that is a bigger blocker than a TODO. These XXXXs seem like definite non-blockers to me. Part of arti#231.
* Remove #![allow(dead_code)] in timeouts.rsNick Mathewson2021-10-211-2/+2
|
* Add a timeout estimator to take estimates from another process.Nick Mathewson2021-10-201-0/+1
|
* Allow type of timeout estimator to change at runtime.Nick Mathewson2021-10-201-3/+16
| | | | | | This is a big change, but it does simplify the type of Builder a little, and isolates locking across different (potential) timeout estimator types.
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-271-0/+162
This will cause some pain for now, but now is really the best time to do this kind of thing.