mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-01-11 23:49:41 -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(),
|
||||
);
|
||||
|
||||
let alice_xmr_locked_fut = alice::swap::run_until(
|
||||
let alice_fut = alice::swap::swap(
|
||||
alice_state,
|
||||
alice::swap::is_xmr_locked,
|
||||
alice_swarm,
|
||||
alice_btc_wallet.clone(),
|
||||
alice_xmr_wallet.clone(),
|
||||
Config::regtest(),
|
||||
);
|
||||
|
||||
// Wait until alice has locked xmr and bob has locked btc
|
||||
let ((alice_state, alice_swarm), _bob_state) =
|
||||
try_join(alice_xmr_locked_fut, bob_xmr_locked_fut)
|
||||
.await
|
||||
.unwrap();
|
||||
// Wait until alice has locked xmr and bob h as locked btc
|
||||
let ((alice_state, _), _bob_state) = try_join(alice_fut, bob_xmr_locked_fut).await.unwrap();
|
||||
|
||||
let (punished, _) = alice::swap::swap(
|
||||
alice_state,
|
||||
alice_swarm,
|
||||
alice_btc_wallet.clone(),
|
||||
alice_xmr_wallet.clone(),
|
||||
Config::regtest(),
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
assert!(matches!(punished, AliceState::Punished));
|
||||
assert!(matches!(alice_state, AliceState::Punished));
|
||||
|
||||
// todo: Add balance assertions
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user