From f091fb2a9188f686e5b1f9012c510a1b3c8ad840 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 30 Oct 2026 16:32:23 +0100 Subject: move transport config checks to respective modules --- src/transport/tor.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/transport/tor.rs') 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( -- cgit v1.3.1