From 8b0215549cb6f0e7da689a0809afaf937d57c3c3 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 10 May 2018 08:48:23 +0930 Subject: [PATCH] options: check that combinations of TOR options are valid. Signed-off-by: Rusty Russell --- lightningd/options.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lightningd/options.c b/lightningd/options.c index bebced635..fb99217d8 100644 --- a/lightningd/options.c +++ b/lightningd/options.c @@ -594,6 +594,12 @@ static void check_config(struct lightningd *ld) if (ld->config.anchor_confirms == 0) fatal("anchor-confirms must be greater than zero"); + + if (ld->config.tor_enable_auto_hidden_service && !ld->tor_serviceaddr) + fatal("--tor-auto-listen needs --tor-service"); + + if (ld->use_tor_proxy_always && !ld->tor_proxyaddr) + fatal("--always-use-tor-proxy needs --proxy"); } static void setup_default_config(struct lightningd *ld)