diff --git a/tests/functional.rs b/tests/functional.rs index b935b9487..62898467b 100644 --- a/tests/functional.rs +++ b/tests/functional.rs @@ -1,10 +1,10 @@ use amplify::map; use bitcoincore_rpc::{Auth, Client, RpcApi}; +use clap::Clap; use farcaster_node::rpc::Request; use farcaster_node::syncerd::bitcoin_syncer::BitcoinSyncer; use farcaster_node::syncerd::monero_syncer::MoneroSyncer; -use farcaster_node::syncerd::opts::Coin; -use farcaster_node::syncerd::runtime::SyncerServers; +use farcaster_node::syncerd::opts::{Coin, Opts}; use farcaster_node::syncerd::runtime::SyncerdTask; use farcaster_node::syncerd::runtime::Synclet; use farcaster_node::syncerd::SweepAddress; @@ -794,19 +794,19 @@ fn create_bitcoin_syncer( tx_event.connect(&addr).unwrap(); rx_event.bind(&addr).unwrap(); let mut syncer = BitcoinSyncer::new(); - let syncer_servers = SyncerServers { - electrum_server: "tcp://localhost:50001".to_string(), - monero_daemon: "".to_string(), - monero_rpc_wallet: "".to_string(), - }; - syncer.run( - rx, - tx_event, - SOURCE1.clone().into(), - syncer_servers, - Network::Local, - polling, - ); + + let opts = Opts::parse_from(vec!["--electrum-server", "tcp://localhost:50001"]); + + syncer + .run( + rx, + tx_event, + SOURCE1.clone().into(), + &opts, + Network::Local, + polling, + ) + .expect("Valid bitcoin syncer"); (tx, rx_event) } @@ -1514,19 +1514,24 @@ fn create_monero_syncer(socket_name: &str) -> (std::sync::mpsc::Sender = System::new_all() .get_processes() .iter() @@ -116,7 +110,7 @@ fn spawn_swap() { #[cfg(feature = "integration_test")] { - let ps_out = std::process::Command::new("ps") + let ps_out = process::Command::new("ps") .args(&["-e"]) .output() .expect("failed to execute process")