Skip to content

Commit

Permalink
asb: only start tor client if register_hidden_service=true in the config
Browse files Browse the repository at this point in the history
  • Loading branch information
Einliterflasche committed Dec 11, 2024
1 parent a3f4317 commit 556d161
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion swap/src/bin/asb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 556d161

Please sign in to comment.