mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-01-25 23:06:00 -05:00
Remove unnecessary execution restart
This commit is contained in:
parent
8592ef5f79
commit
627b1a9f00
@ -161,32 +161,18 @@ async fn alice_punishes_if_bob_never_acts_after_fund() {
|
|||||||
Uuid::new_v4(),
|
Uuid::new_v4(),
|
||||||
);
|
);
|
||||||
|
|
||||||
let alice_xmr_locked_fut = alice::swap::run_until(
|
let alice_fut = alice::swap::swap(
|
||||||
alice_state,
|
alice_state,
|
||||||
alice::swap::is_xmr_locked,
|
|
||||||
alice_swarm,
|
alice_swarm,
|
||||||
alice_btc_wallet.clone(),
|
alice_btc_wallet.clone(),
|
||||||
alice_xmr_wallet.clone(),
|
alice_xmr_wallet.clone(),
|
||||||
Config::regtest(),
|
Config::regtest(),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Wait until alice has locked xmr and bob has locked btc
|
// Wait until alice has locked xmr and bob h as locked btc
|
||||||
let ((alice_state, alice_swarm), _bob_state) =
|
let ((alice_state, _), _bob_state) = try_join(alice_fut, bob_xmr_locked_fut).await.unwrap();
|
||||||
try_join(alice_xmr_locked_fut, bob_xmr_locked_fut)
|
|
||||||
.await
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let (punished, _) = alice::swap::swap(
|
assert!(matches!(alice_state, AliceState::Punished));
|
||||||
alice_state,
|
|
||||||
alice_swarm,
|
|
||||||
alice_btc_wallet.clone(),
|
|
||||||
alice_xmr_wallet.clone(),
|
|
||||||
Config::regtest(),
|
|
||||||
)
|
|
||||||
.await
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
assert!(matches!(punished, AliceState::Punished));
|
|
||||||
|
|
||||||
// todo: Add balance assertions
|
// todo: Add balance assertions
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user