Fix swap e2e test

This commit is contained in:
Lucas Soriano del Pino 2020-11-02 17:37:46 +11:00 committed by rishflab
parent 934ddb366a
commit a26890001b

View File

@ -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,