Skip to content

Commit f010232

Browse files
authored
Merge pull request #318 from Wukong247/2024-12-2-fix-tor
fix tor bug
2 parents 9977fdb + e2ee88f commit f010232

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/bin/directoryd.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use clap::Parser;
22
use coinswap::{
33
market::directory::{start_directory_server, DirectoryServer, DirectoryServerError},
4+
tor::setup_mitosis,
45
utill::{setup_logger, ConnectionType},
56
};
67
use std::{path::PathBuf, str::FromStr, sync::Arc};
@@ -24,6 +25,10 @@ fn main() -> Result<(), DirectoryServerError> {
2425

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

28+
if conn_type == ConnectionType::TOR {
29+
setup_mitosis();
30+
}
31+
2732
let directory = Arc::new(DirectoryServer::new(args.data_directory, Some(conn_type))?);
2833

2934
start_directory_server(directory)?;

src/bin/makerd.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use bitcoind::bitcoincore_rpc::Auth;
22
use clap::Parser;
33
use coinswap::{
44
maker::{start_maker_server, Maker, MakerBehavior, MakerError},
5+
tor::setup_mitosis,
56
utill::{parse_proxy_auth, setup_logger, ConnectionType},
67
wallet::RPCConfig,
78
};
@@ -66,6 +67,10 @@ fn main() -> Result<(), MakerError> {
6667
wallet_name: "random".to_string(), // we can put anything here as it will get updated in the init.
6768
};
6869

70+
if conn_type == ConnectionType::TOR {
71+
setup_mitosis();
72+
}
73+
6974
let maker = Arc::new(Maker::init(
7075
args.data_directory,
7176
args.wallet_name,

0 commit comments

Comments
 (0)