Only carry the tx_lock_id instead of the full state

pull/100/head
Franck Royer 4 years ago
parent edfab58246
commit d9ea7ab605
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4

@ -108,8 +108,8 @@ async fn given_alice_restarts_after_xmr_is_locked_abort_swap() {
_ = alice_event_loop_1.run() => panic!("The event loop should never finish") _ = alice_event_loop_1.run() => panic!("The event loop should never finish")
}; };
let bob_state4 = if let BobState::BtcRefunded(state4) = bob_state { let tx_lock_id = if let BobState::BtcRefunded(state4) = bob_state {
state4 state4.tx_lock_id()
} else { } else {
panic!("Bob in unexpected state"); panic!("Bob in unexpected state");
}; };
@ -138,10 +138,7 @@ async fn given_alice_restarts_after_xmr_is_locked_abort_swap() {
let btc_alice_final = alice_btc_wallet.as_ref().balance().await.unwrap(); let btc_alice_final = alice_btc_wallet.as_ref().balance().await.unwrap();
let btc_bob_final = bob_btc_wallet.as_ref().balance().await.unwrap(); let btc_bob_final = bob_btc_wallet.as_ref().balance().await.unwrap();
let lock_tx_bitcoin_fee = bob_btc_wallet let lock_tx_bitcoin_fee = bob_btc_wallet.transaction_fee(tx_lock_id).await.unwrap();
.transaction_fee(bob_state4.tx_lock_id())
.await
.unwrap();
assert_eq!(btc_alice_final, alice_btc_starting_balance); assert_eq!(btc_alice_final, alice_btc_starting_balance);

Loading…
Cancel
Save