Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(asb): Compilation error introduced in #203 #222

Merged
merged 2 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion swap/src/asb/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ pub mod transport {
pub fn new(
identity: &identity::Keypair,
maybe_tor_client: Option<Arc<TorClient<TokioRustlsRuntime>>>,
num_intro_points: u8,
register_hidden_service: bool,
num_intro_points: u8,
) -> Result<OnionTransportWithAddresses> {
let (maybe_tor_transport, onion_addresses) = if let Some(tor_client) = maybe_tor_client {
let mut tor_transport = libp2p_community_tor::TorTransport::from_client(
Expand Down
3 changes: 2 additions & 1 deletion swap/src/bin/asb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
8 changes: 4 additions & 4 deletions swap/src/network/swarm.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use crate::asb::config::TorConf;
use crate::asb::{LatestRate, RendezvousNode};
use crate::libp2p_ext::MultiAddrExt;
use crate::network::rendezvous::XmrBtcNamespace;
Expand All @@ -25,7 +24,8 @@ pub fn asb<LR>(
namespace: XmrBtcNamespace,
rendezvous_addrs: &[Multiaddr],
maybe_tor_client: Option<Arc<TorClient<TokioRustlsRuntime>>>,
tor_conf: TorConf,
register_hidden_service: bool,
num_intro_points: u8,
) -> Result<(Swarm<asb::Behaviour<LR>>, Vec<Multiaddr>)>
where
LR: LatestRate + Send + 'static + Debug + Clone,
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions swap/tests/harness/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ async fn start_alice(
XmrBtcNamespace::Testnet,
&[],
None,
false,
1,
)
.unwrap();
swarm.listen_on(listen_address).unwrap();
Expand Down
Loading