mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-12-25 23:49:31 -05:00
Merge #724
724: Handle errors when waiting for subscriptions r=rishflab a=rishflab We were not thorough enough in PR #705 and there were some remaining unhandled errors. Co-authored-by: rishflab <rishflab@hotmail.com>
This commit is contained in:
commit
1f371ecfee
@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Fixed
|
||||
|
||||
- A bug where the ASB erroneously transitioned into a punishable state upon a bitcoin transaction monitoring error.
|
||||
This could lead to a scenario where the ASB was neither able to punish, nor able to refund, so the XMR could stay locked up forever while the CLI refunded the BTC.
|
||||
- A bug where the CLI erroneously transitioned into a cancel-timelock-expired state upon a bitcoin transaction monitoring error.
|
||||
This could lead to a scenario where the CLI is forced to wait for cancel, even though the cancel timelock is not yet expired and the swap could still be redeemed.
|
||||
|
||||
## [0.8.2] - 2021-09-01
|
||||
|
||||
### Added
|
||||
|
@ -176,7 +176,8 @@ where
|
||||
state3,
|
||||
}
|
||||
},
|
||||
_ = 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,
|
||||
@ -325,7 +326,9 @@ where
|
||||
state3,
|
||||
}
|
||||
}
|
||||
_ = tx_cancel_status.wait_until_confirmed_with(state3.punish_timelock) => {
|
||||
result = tx_cancel_status.wait_until_confirmed_with(state3.punish_timelock) => {
|
||||
let _ = result?;
|
||||
|
||||
AliceState::BtcPunishable {
|
||||
monero_wallet_restore_blockheight,
|
||||
transfer_proof,
|
||||
|
@ -123,7 +123,8 @@ async fn next_state(
|
||||
monero_wallet_restore_blockheight
|
||||
}
|
||||
},
|
||||
_ = cancel_timelock_expires => {
|
||||
result = cancel_timelock_expires => {
|
||||
let _ = result?;
|
||||
tracing::info!("Alice took too long to lock Monero, cancelling the swap");
|
||||
|
||||
let state4 = state3.cancel();
|
||||
|
Loading…
Reference in New Issue
Block a user