mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-05-20 15:40:48 -04:00
Fail if something goes wrong when checking tx lock status
Probably a failure when interacting with the electrum node to get script status updates
This commit is contained in:
parent
9d11cbb90d
commit
18faa786d6
3 changed files with 12 additions and 5 deletions
|
@ -195,7 +195,8 @@ where
|
|||
select! {
|
||||
biased; // make sure the cancel timelock expiry future is polled first
|
||||
|
||||
_ = tx_lock_status.wait_until_confirmed_with(state3.cancel_timelock) => {
|
||||
result = tx_lock_status.wait_until_confirmed_with(state3.cancel_timelock) => {
|
||||
let _ = result?;
|
||||
AliceState::CancelTimelockExpired {
|
||||
monero_wallet_restore_blockheight,
|
||||
transfer_proof,
|
||||
|
|
|
@ -128,7 +128,7 @@ async fn next_state(
|
|||
|
||||
let state4 = state3.cancel();
|
||||
BobState::CancelTimelockExpired(state4)
|
||||
}
|
||||
},
|
||||
}
|
||||
} else {
|
||||
let state4 = state3.cancel();
|
||||
|
@ -159,7 +159,8 @@ async fn next_state(
|
|||
},
|
||||
}
|
||||
}
|
||||
_ = tx_lock_status.wait_until_confirmed_with(state.cancel_timelock) => {
|
||||
result = tx_lock_status.wait_until_confirmed_with(state.cancel_timelock) => {
|
||||
let _ = result?;
|
||||
BobState::CancelTimelockExpired(state.cancel())
|
||||
}
|
||||
}
|
||||
|
@ -178,7 +179,8 @@ async fn next_state(
|
|||
_ = event_loop_handle.send_encrypted_signature(state.tx_redeem_encsig()) => {
|
||||
BobState::EncSigSent(state)
|
||||
},
|
||||
_ = tx_lock_status.wait_until_confirmed_with(state.cancel_timelock) => {
|
||||
result = tx_lock_status.wait_until_confirmed_with(state.cancel_timelock) => {
|
||||
let _ = result?;
|
||||
BobState::CancelTimelockExpired(state.cancel())
|
||||
}
|
||||
}
|
||||
|
@ -194,7 +196,8 @@ async fn next_state(
|
|||
state5 = state.watch_for_redeem_btc(bitcoin_wallet) => {
|
||||
BobState::BtcRedeemed(state5?)
|
||||
},
|
||||
_ = tx_lock_status.wait_until_confirmed_with(state.cancel_timelock) => {
|
||||
result = tx_lock_status.wait_until_confirmed_with(state.cancel_timelock) => {
|
||||
let _ = result?;
|
||||
BobState::CancelTimelockExpired(state.cancel())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue