From a26890001bb36d0cb0fa90ef66b078d887b86f69 Mon Sep 17 00:00:00 2001 From: Lucas Soriano del Pino Date: Mon, 2 Nov 2020 17:37:46 +1100 Subject: [PATCH] Fix swap e2e test --- swap/tests/e2e.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/swap/tests/e2e.rs b/swap/tests/e2e.rs index 9c8eda1b..8f2d031f 100644 --- a/swap/tests/e2e.rs +++ b/swap/tests/e2e.rs @@ -16,7 +16,7 @@ mod e2e_test { "swap=debug,xmr_btc=debug,hyper=off,reqwest=off,monero_harness=info,testcontainers=info,libp2p=debug", ) .with_ansi(false) - .set_default(); + .set_default(); let alice_multiaddr: Multiaddr = "/ip4/127.0.0.1/tcp/9876" .parse() @@ -69,14 +69,21 @@ mod e2e_test { let alice_behaviour = alice::Alice::default(); let alice_transport = build(alice_behaviour.identity()).unwrap(); + + let db_dir = tempdir().unwrap(); + let db = Database::open(db_dir.path()).unwrap(); + let alice_swap = alice::swap( alice_btc_wallet.clone(), alice_xmr_wallet.clone(), + db, alice_multiaddr.clone(), alice_transport, alice_behaviour, ); + let db_dir = tempdir().unwrap(); + let db = Database::open(db_dir.path()).unwrap(); let (cmd_tx, mut _cmd_rx) = mpsc::channel(1); let (mut rsp_tx, rsp_rx) = mpsc::channel(1); let bob_behaviour = bob::Bob::default(); @@ -84,6 +91,7 @@ mod e2e_test { let bob_swap = bob::swap( bob_btc_wallet.clone(), bob_xmr_wallet.clone(), + db, btc.as_sat(), alice_multiaddr, cmd_tx,