Skip to content

Commit 2633e8e

Browse files
authored
fix(asb): Compilation error introduced in #203 (#222)
1 parent d53c12d commit 2633e8e

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

swap/src/asb/network.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ pub mod transport {
4646
pub fn new(
4747
identity: &identity::Keypair,
4848
maybe_tor_client: Option<Arc<TorClient<TokioRustlsRuntime>>>,
49-
num_intro_points: u8,
5049
register_hidden_service: bool,
50+
num_intro_points: u8,
5151
) -> Result<OnionTransportWithAddresses> {
5252
let (maybe_tor_transport, onion_addresses) = if let Some(tor_client) = maybe_tor_client {
5353
let mut tor_transport = libp2p_community_tor::TorTransport::from_client(

swap/src/bin/asb.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ pub async fn main() -> Result<()> {
165165
namespace,
166166
&rendezvous_addrs,
167167
tor_client,
168-
config.tor,
168+
config.tor.register_hidden_service,
169+
config.tor.hidden_service_num_intro_points,
169170
)?;
170171

171172
for listen in config.network.listen.clone() {

swap/src/network/swarm.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use crate::asb::config::TorConf;
21
use crate::asb::{LatestRate, RendezvousNode};
32
use crate::libp2p_ext::MultiAddrExt;
43
use crate::network::rendezvous::XmrBtcNamespace;
@@ -25,7 +24,8 @@ pub fn asb<LR>(
2524
namespace: XmrBtcNamespace,
2625
rendezvous_addrs: &[Multiaddr],
2726
maybe_tor_client: Option<Arc<TorClient<TokioRustlsRuntime>>>,
28-
tor_conf: TorConf,
27+
register_hidden_service: bool,
28+
num_intro_points: u8,
2929
) -> Result<(Swarm<asb::Behaviour<LR>>, Vec<Multiaddr>)>
3030
where
3131
LR: LatestRate + Send + 'static + Debug + Clone,
@@ -56,8 +56,8 @@ where
5656
let (transport, onion_addresses) = asb::transport::new(
5757
&identity,
5858
maybe_tor_client,
59-
tor_conf.hidden_service_num_intro_points,
60-
tor_conf.register_hidden_service,
59+
register_hidden_service,
60+
num_intro_points,
6161
)?;
6262

6363
let swarm = SwarmBuilder::with_existing_identity(identity)

swap/tests/harness/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,8 @@ async fn start_alice(
253253
XmrBtcNamespace::Testnet,
254254
&[],
255255
None,
256+
false,
257+
1,
256258
)
257259
.unwrap();
258260
swarm.listen_on(listen_address).unwrap();

0 commit comments

Comments
 (0)