asb: only start tor client if register_hidden_service=true in the config

This commit is contained in:
einliterflasche 2024-12-11 06:26:35 +01:00
parent a854b8f14f
commit a8e02e0921
No known key found for this signature in database
GPG Key ID: 90676A9B07184BC9

View File

@ -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,