Skip to content

Commit

Permalink
Merge pull request #318 from Wukong247/2024-12-2-fix-tor
Browse files Browse the repository at this point in the history
fix tor bug
  • Loading branch information
mojoX911 authored Dec 3, 2024
2 parents 9977fdb + e2ee88f commit f010232
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/bin/directoryd.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use clap::Parser;
use coinswap::{
market::directory::{start_directory_server, DirectoryServer, DirectoryServerError},
tor::setup_mitosis,
utill::{setup_logger, ConnectionType},
};
use std::{path::PathBuf, str::FromStr, sync::Arc};
Expand All @@ -24,6 +25,10 @@ fn main() -> Result<(), DirectoryServerError> {

let conn_type = ConnectionType::from_str(&args.network)?;

if conn_type == ConnectionType::TOR {
setup_mitosis();
}

let directory = Arc::new(DirectoryServer::new(args.data_directory, Some(conn_type))?);

start_directory_server(directory)?;
Expand Down
5 changes: 5 additions & 0 deletions src/bin/makerd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use bitcoind::bitcoincore_rpc::Auth;
use clap::Parser;
use coinswap::{
maker::{start_maker_server, Maker, MakerBehavior, MakerError},
tor::setup_mitosis,
utill::{parse_proxy_auth, setup_logger, ConnectionType},
wallet::RPCConfig,
};
Expand Down Expand Up @@ -66,6 +67,10 @@ fn main() -> Result<(), MakerError> {
wallet_name: "random".to_string(), // we can put anything here as it will get updated in the init.
};

if conn_type == ConnectionType::TOR {
setup_mitosis();
}

let maker = Arc::new(Maker::init(
args.data_directory,
args.wallet_name,
Expand Down

0 comments on commit f010232

Please sign in to comment.