mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-09-29 21:06:21 +00:00
Add some log statements to bob::cancel
This commit is contained in:
parent
3f54b39281
commit
90a7760124
@ -40,7 +40,11 @@ pub async fn cancel(
|
|||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
tracing::info!(%swap_id, "Manually cancelling swap");
|
||||||
|
|
||||||
if !force {
|
if !force {
|
||||||
|
tracing::debug!(%swap_id, "Checking if cancel timelock is expired");
|
||||||
|
|
||||||
if let ExpiredTimelocks::None = state6.expired_timelock(bitcoin_wallet.as_ref()).await? {
|
if let ExpiredTimelocks::None = state6.expired_timelock(bitcoin_wallet.as_ref()).await? {
|
||||||
return Ok(Err(Error::CancelTimelockNotExpiredYet));
|
return Ok(Err(Error::CancelTimelockNotExpiredYet));
|
||||||
}
|
}
|
||||||
@ -50,6 +54,8 @@ pub async fn cancel(
|
|||||||
.await
|
.await
|
||||||
.is_ok()
|
.is_ok()
|
||||||
{
|
{
|
||||||
|
tracing::debug!(%swap_id, "Cancel transaction has already been published");
|
||||||
|
|
||||||
let state = BobState::BtcCancelled(state6);
|
let state = BobState::BtcCancelled(state6);
|
||||||
let db_state = state.into();
|
let db_state = state.into();
|
||||||
db.insert_latest_state(swap_id, Swap::Bob(db_state)).await?;
|
db.insert_latest_state(swap_id, Swap::Bob(db_state)).await?;
|
||||||
|
Loading…
Reference in New Issue
Block a user