mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-10-01 01:45:40 -04:00
Fix swap e2e test
This commit is contained in:
parent
934ddb366a
commit
a26890001b
@ -16,7 +16,7 @@ mod e2e_test {
|
|||||||
"swap=debug,xmr_btc=debug,hyper=off,reqwest=off,monero_harness=info,testcontainers=info,libp2p=debug",
|
"swap=debug,xmr_btc=debug,hyper=off,reqwest=off,monero_harness=info,testcontainers=info,libp2p=debug",
|
||||||
)
|
)
|
||||||
.with_ansi(false)
|
.with_ansi(false)
|
||||||
.set_default();
|
.set_default();
|
||||||
|
|
||||||
let alice_multiaddr: Multiaddr = "/ip4/127.0.0.1/tcp/9876"
|
let alice_multiaddr: Multiaddr = "/ip4/127.0.0.1/tcp/9876"
|
||||||
.parse()
|
.parse()
|
||||||
@ -69,14 +69,21 @@ mod e2e_test {
|
|||||||
|
|
||||||
let alice_behaviour = alice::Alice::default();
|
let alice_behaviour = alice::Alice::default();
|
||||||
let alice_transport = build(alice_behaviour.identity()).unwrap();
|
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(
|
let alice_swap = alice::swap(
|
||||||
alice_btc_wallet.clone(),
|
alice_btc_wallet.clone(),
|
||||||
alice_xmr_wallet.clone(),
|
alice_xmr_wallet.clone(),
|
||||||
|
db,
|
||||||
alice_multiaddr.clone(),
|
alice_multiaddr.clone(),
|
||||||
alice_transport,
|
alice_transport,
|
||||||
alice_behaviour,
|
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 (cmd_tx, mut _cmd_rx) = mpsc::channel(1);
|
||||||
let (mut rsp_tx, rsp_rx) = mpsc::channel(1);
|
let (mut rsp_tx, rsp_rx) = mpsc::channel(1);
|
||||||
let bob_behaviour = bob::Bob::default();
|
let bob_behaviour = bob::Bob::default();
|
||||||
@ -84,6 +91,7 @@ mod e2e_test {
|
|||||||
let bob_swap = bob::swap(
|
let bob_swap = bob::swap(
|
||||||
bob_btc_wallet.clone(),
|
bob_btc_wallet.clone(),
|
||||||
bob_xmr_wallet.clone(),
|
bob_xmr_wallet.clone(),
|
||||||
|
db,
|
||||||
btc.as_sat(),
|
btc.as_sat(),
|
||||||
alice_multiaddr,
|
alice_multiaddr,
|
||||||
cmd_tx,
|
cmd_tx,
|
||||||
|
Loading…
Reference in New Issue
Block a user