diff options
| author | tv <tv@krebsco.de> | 2026-10-30 16:32:23 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-30 16:32:23 +0100 |
| commit | f091fb2a9188f686e5b1f9012c510a1b3c8ad840 (patch) | |
| tree | 8821dfe3c63535762a798b85dfe8c0d850a9df90 /src/transport/tor.rs | |
| parent | 0ee0cd19b7ceabf5d75e1b8fdd074a6e758bc6db (diff) | |
move transport config checks to respective modules
Diffstat (limited to 'src/transport/tor.rs')
| -rw-r--r-- | src/transport/tor.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/transport/tor.rs b/src/transport/tor.rs index 8eb1d02..f2e0199 100644 --- a/src/transport/tor.rs +++ b/src/transport/tor.rs @@ -198,6 +198,17 @@ impl TorTransport { /// while: it fetches what it needs to know of the Tor network). Until it is done, /// dials wait for it (arti bootstraps on demand), and the onion service is published /// once it is: the node starts without waiting for Tor. + /// This transport's options, checked when the configuration is loaded + /// (`config::Settings::check`), if the node uses it: where arti keeps its state. + pub(crate) fn check(settings: &crate::config::Settings) -> Result<()> { + if settings.tor_state_dir.is_none() { + bail!( + "tor needs tor-state-dir: where arti keeps its state, the onion service's key among it" + ); + } + Ok(()) + } + /// The transport as `settings` configure it (`transport::start`), proving `key`. /// None if `stop` came first (bootstrapping arti can take a while). pub(crate) async fn from_settings( |
