From 487b880371529db17bb48eb9016a88c5b9a5e57f Mon Sep 17 00:00:00 2001 From: Daniel Karzel Date: Thu, 7 Jan 2021 12:23:29 +1100 Subject: [PATCH] Cleanup unused config param that was accidentally introduced --- swap/src/bob/swap.rs | 12 ------------ swap/src/main.rs | 4 ---- swap/tests/happy_path.rs | 1 - swap/tests/happy_path_restart_alice.rs | 1 - swap/tests/happy_path_restart_bob_after_comm.rs | 2 -- swap/tests/happy_path_restart_bob_before_comm.rs | 2 -- swap/tests/punish.rs | 1 - swap/tests/refund_restart_alice.rs | 1 - 8 files changed, 24 deletions(-) diff --git a/swap/src/bob/swap.rs b/swap/src/bob/swap.rs index d85a7b92..223f29c1 100644 --- a/swap/src/bob/swap.rs +++ b/swap/src/bob/swap.rs @@ -8,7 +8,6 @@ use tracing::info; use uuid::Uuid; use xmr_btc::{ bob::{self, State2}, - config::Config, ExpiredTimelocks, }; @@ -60,7 +59,6 @@ pub async fn swap( monero_wallet: Arc, rng: R, swap_id: Uuid, - config: Config, ) -> Result where R: RngCore + CryptoRng + Send, @@ -74,7 +72,6 @@ where monero_wallet, rng, swap_id, - config, ) .await } @@ -113,7 +110,6 @@ pub async fn run_until( monero_wallet: Arc, mut rng: R, swap_id: Uuid, - config: Config, ) -> Result where R: RngCore + CryptoRng + Send, @@ -148,7 +144,6 @@ where monero_wallet, rng, swap_id, - config, ) .await } @@ -171,7 +166,6 @@ where monero_wallet, rng, swap_id, - config, ) .await } @@ -226,7 +220,6 @@ where monero_wallet, rng, swap_id, - config, ) .await } @@ -269,7 +262,6 @@ where monero_wallet, rng, swap_id, - config, ) .await } @@ -306,7 +298,6 @@ where monero_wallet, rng, swap_id, - config, ) .await } @@ -327,7 +318,6 @@ where monero_wallet, rng, swap_id, - config, ) .await } @@ -353,7 +343,6 @@ where monero_wallet, rng, swap_id, - config, ) .await } @@ -382,7 +371,6 @@ where monero_wallet, rng, swap_id, - config, ) .await } diff --git a/swap/src/main.rs b/swap/src/main.rs index ff48cf08..64291698 100644 --- a/swap/src/main.rs +++ b/swap/src/main.rs @@ -160,7 +160,6 @@ async fn main() -> Result<()> { db, alice_peer_id, alice_addr, - config, ) .await?; } @@ -236,7 +235,6 @@ async fn main() -> Result<()> { db, alice_peer_id, alice_addr, - config, ) .await?; } @@ -313,7 +311,6 @@ async fn bob_swap( db: Database, alice_peer_id: PeerId, alice_addr: Multiaddr, - config: Config, ) -> Result { let bob_behaviour = bob::Behaviour::default(); let bob_transport = build(bob_behaviour.identity())?; @@ -329,7 +326,6 @@ async fn bob_swap( monero_wallet.clone(), OsRng, swap_id, - config, ); tokio::spawn(event_loop.run()); diff --git a/swap/tests/happy_path.rs b/swap/tests/happy_path.rs index 360b893b..874378e1 100644 --- a/swap/tests/happy_path.rs +++ b/swap/tests/happy_path.rs @@ -98,7 +98,6 @@ async fn happy_path() { bob_xmr_wallet.clone(), OsRng, Uuid::new_v4(), - config, ) .boxed(); diff --git a/swap/tests/happy_path_restart_alice.rs b/swap/tests/happy_path_restart_alice.rs index e94de786..bb7b2bab 100644 --- a/swap/tests/happy_path_restart_alice.rs +++ b/swap/tests/happy_path_restart_alice.rs @@ -83,7 +83,6 @@ async fn given_alice_restarts_after_encsig_is_learned_resume_swap() { bob_xmr_wallet.clone(), OsRng, Uuid::new_v4(), - config, ); let alice_db_datadir = tempdir().unwrap(); diff --git a/swap/tests/happy_path_restart_bob_after_comm.rs b/swap/tests/happy_path_restart_bob_after_comm.rs index a09d314c..5b9c6007 100644 --- a/swap/tests/happy_path_restart_bob_after_comm.rs +++ b/swap/tests/happy_path_restart_bob_after_comm.rs @@ -106,7 +106,6 @@ async fn given_bob_restarts_after_encsig_is_sent_resume_swap() { bob_xmr_wallet.clone(), OsRng, bob_swap_id, - config, ) .await .unwrap(); @@ -135,7 +134,6 @@ async fn given_bob_restarts_after_encsig_is_sent_resume_swap() { bob_xmr_wallet, OsRng, bob_swap_id, - config, ) .await .unwrap(); diff --git a/swap/tests/happy_path_restart_bob_before_comm.rs b/swap/tests/happy_path_restart_bob_before_comm.rs index d63bf779..c6d24634 100644 --- a/swap/tests/happy_path_restart_bob_before_comm.rs +++ b/swap/tests/happy_path_restart_bob_before_comm.rs @@ -95,7 +95,6 @@ async fn given_bob_restarts_after_xmr_is_locked_resume_swap() { bob_xmr_wallet.clone(), OsRng, bob_swap_id, - Config::regtest(), ) }; @@ -121,7 +120,6 @@ async fn given_bob_restarts_after_xmr_is_locked_resume_swap() { bob_xmr_wallet.clone(), OsRng, bob_swap_id, - Config::regtest(), ); let bob_final_state = select! { diff --git a/swap/tests/punish.rs b/swap/tests/punish.rs index 9bc69d63..16ed427e 100644 --- a/swap/tests/punish.rs +++ b/swap/tests/punish.rs @@ -84,7 +84,6 @@ async fn alice_punishes_if_bob_never_acts_after_fund() { bob_xmr_wallet.clone(), OsRng, Uuid::new_v4(), - config, ) .boxed(); diff --git a/swap/tests/refund_restart_alice.rs b/swap/tests/refund_restart_alice.rs index c9671524..6eb03c18 100644 --- a/swap/tests/refund_restart_alice.rs +++ b/swap/tests/refund_restart_alice.rs @@ -81,7 +81,6 @@ async fn given_alice_restarts_after_xmr_is_locked_abort_swap() { bob_xmr_wallet.clone(), OsRng, Uuid::new_v4(), - Config::regtest(), ); let alice_swap_id = Uuid::new_v4();