aboutsummaryrefslogtreecommitdiffstats
path: root/src/transport/tor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/tor.rs')
-rw-r--r--src/transport/tor.rs11
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(