diff --git a/swap/src/asb/network.rs b/swap/src/asb/network.rs index 03102146..ba1784f6 100644 --- a/swap/src/asb/network.rs +++ b/swap/src/asb/network.rs @@ -46,8 +46,8 @@ pub mod transport { pub fn new( identity: &identity::Keypair, maybe_tor_client: Option>>, - num_intro_points: u8, register_hidden_service: bool, + num_intro_points: u8, ) -> Result { let (maybe_tor_transport, onion_addresses) = if let Some(tor_client) = maybe_tor_client { let mut tor_transport = libp2p_community_tor::TorTransport::from_client( diff --git a/swap/src/bin/asb.rs b/swap/src/bin/asb.rs index b7d85b23..19e3f29c 100644 --- a/swap/src/bin/asb.rs +++ b/swap/src/bin/asb.rs @@ -165,7 +165,8 @@ pub async fn main() -> Result<()> { namespace, &rendezvous_addrs, tor_client, - config.tor, + config.tor.register_hidden_service, + config.tor.hidden_service_num_intro_points, )?; for listen in config.network.listen.clone() { diff --git a/swap/src/network/swarm.rs b/swap/src/network/swarm.rs index 79d483b4..68ecb32a 100644 --- a/swap/src/network/swarm.rs +++ b/swap/src/network/swarm.rs @@ -1,4 +1,3 @@ -use crate::asb::config::TorConf; use crate::asb::{LatestRate, RendezvousNode}; use crate::libp2p_ext::MultiAddrExt; use crate::network::rendezvous::XmrBtcNamespace; @@ -25,7 +24,8 @@ pub fn asb( namespace: XmrBtcNamespace, rendezvous_addrs: &[Multiaddr], maybe_tor_client: Option>>, - tor_conf: TorConf, + register_hidden_service: bool, + num_intro_points: u8, ) -> Result<(Swarm>, Vec)> where LR: LatestRate + Send + 'static + Debug + Clone, @@ -56,8 +56,8 @@ where let (transport, onion_addresses) = asb::transport::new( &identity, maybe_tor_client, - tor_conf.hidden_service_num_intro_points, - tor_conf.register_hidden_service, + register_hidden_service, + num_intro_points, )?; let swarm = SwarmBuilder::with_existing_identity(identity) diff --git a/swap/tests/harness/mod.rs b/swap/tests/harness/mod.rs index 71f4005e..c086e36a 100644 --- a/swap/tests/harness/mod.rs +++ b/swap/tests/harness/mod.rs @@ -253,6 +253,8 @@ async fn start_alice( XmrBtcNamespace::Testnet, &[], None, + false, + 1, ) .unwrap(); swarm.listen_on(listen_address).unwrap();