From a8e02e092123c1f586fd122a1853e7abfba74eaa Mon Sep 17 00:00:00 2001 From: einliterflasche Date: Wed, 11 Dec 2024 06:26:35 +0100 Subject: [PATCH] asb: only start tor client if register_hidden_service=true in the config --- swap/src/bin/asb.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/swap/src/bin/asb.rs b/swap/src/bin/asb.rs index 46e4c7a8..422e66f8 100644 --- a/swap/src/bin/asb.rs +++ b/swap/src/bin/asb.rs @@ -159,7 +159,11 @@ pub async fn main() -> Result<()> { let namespace = XmrBtcNamespace::from_is_testnet(testnet); // Initialize Tor client - let tor_client = init_tor_client(&config.data.dir).await?.into(); + let tor_client = if config.tor.register_hidden_service { + init_tor_client(&config.data.dir).await?.into() + } else { + None + }; let (mut swarm, onion_addresses) = swarm::asb( &seed,