diff --git a/swap/src/protocol/bob/swap.rs b/swap/src/protocol/bob/swap.rs index c82bf10e..525644bf 100644 --- a/swap/src/protocol/bob/swap.rs +++ b/swap/src/protocol/bob/swap.rs @@ -193,7 +193,14 @@ async fn next_state( result = event_loop_handle.send_encrypted_signature(state.tx_redeem_encsig()) => { match result { Ok(_) => BobState::EncSigSent(state), - Err(bmrng::error::RequestError::RecvError | bmrng::error::RequestError::SendError(_)) => bail!("Failed to communicate encrypted signature through event loop channel"), + Err(bmrng::error::RequestError::RecvError | bmrng::error::RequestError::SendError(_)) => { + tracing::error("Failed to communicate encrypted signature through event loop channel"); + tracing::info!(timelock = %state.cancel_timelock, "Waiting for cancel timelock to expire"); + + tx_lock_status.wait_until_confirmed_with(state.cancel_timelock).await?; + + BobState::CancelTimelockExpired(state.cancel()) + }, Err(bmrng::error::RequestError::RecvTimeoutError) => unreachable!("We construct the channel with no timeout"), } },