Add some log statements to bob::cancel

pull/387/head
Thomas Eizinger 3 years ago
parent 3f54b39281
commit 90a7760124
No known key found for this signature in database
GPG Key ID: 651AC83A6C6C8B96

@ -40,7 +40,11 @@ pub async fn cancel(
),
};
tracing::info!(%swap_id, "Manually cancelling swap");
if !force {
tracing::debug!(%swap_id, "Checking if cancel timelock is expired");
if let ExpiredTimelocks::None = state6.expired_timelock(bitcoin_wallet.as_ref()).await? {
return Ok(Err(Error::CancelTimelockNotExpiredYet));
}
@ -50,6 +54,8 @@ pub async fn cancel(
.await
.is_ok()
{
tracing::debug!(%swap_id, "Cancel transaction has already been published");
let state = BobState::BtcCancelled(state6);
let db_state = state.into();
db.insert_latest_state(swap_id, Swap::Bob(db_state)).await?;

Loading…
Cancel
Save