Update swap.rs

This commit is contained in:
binarybaron 2022-04-19 14:34:54 +02:00
parent 2391356c6a
commit f0b4735163

View File

@ -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"),
}
},