aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-chanmgr/src/mgr/state.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* chanmgr: remove a needless mut.Nick Mathewson2023-05-111-1/+1
| | | | This fixes a warning from nightly clippy.
* Errors: Mark the type of an error, for clarityIan Jackson2023-01-301-2/+2
| | | | | We want to call ErrorReport::report() on Errors, but this isn't an Error but only a string.
* 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.
* tor-chanmgr: Introduce the BootstrapReporter API, publicize ChanBuildereta2022-11-281-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | This commit makes the `ChanBuilder` type in `tor-chanmgr` usable by consumers outside of that crate, like the doc comment for `ChannelFactory` says you need to be able to do in order to turn your `TransportHelper` into something useful. As part of doing this, the `event_sender` its constructor takes needed to be dealt with, since it was a crate-internal type that came from inside the `ChanMgr`. Enter `BootstrapReporter`: an opaque wrapper around that sender, now provided as an additional argument to `ChannelFactory::connect_via_transport`. You can now construct a `ChanBuilder` outside this crate, and it'll still be able to report its bootstrap status by unwrapping this new type that's threaded through from the `ChanMgr`. (This was a fair deal of manually threading the type through all the layers in this crate!) Note that you cannot implement bootstrap updating using something that isn't `ChanBuilder` yet due to the type being entirely opaque (but, of course, we can figure out exactly what API the reporter should have later, and add that capability in).
* ChanMgr: Fix a few more conditional-compilation issuesNick Mathewson2022-11-231-0/+1
|
* ChanMgr: Implement functions that replace channel factories.Nick Mathewson2022-11-231-4/+6
| | | | | | | This commit makes it possible to replace the default channel factory (used when there is no PtMgr), and to replace the PtMgr. This is part of #659.
* ChanMgr: move the AbstractChanFactory into MgrState.Nick Mathewson2022-11-221-7/+47
| | | | | | We will want the freedom to replace this, so it needs to go behind a lock. We need to be able to Clone it cheaply now, so we're using an Arc instead of a Box.
* chanmgr: rename new_test_channel_map to new_test_state.Nick Mathewson2022-11-161-5/+5
|
* chanmgr::mgr::*: misc spelling fixes and normali[sz]ationsNick Mathewson2022-11-161-5/+5
|
* Fix up documentation that referred to a ChannelMap.Nick Mathewson2022-11-161-17/+13
|
* ChanMgr: Rename map.rs to state.rsNick Mathewson2022-11-161-0/+744
This is another pure renaming.