Don't wait for confirmations again

We only call this function within `CancelTimelockExpired`. There is
no need to check the confirmations again.
This commit is contained in:
Thomas Eizinger 2021-03-18 12:39:52 +11:00
parent c92f2dbc77
commit afb7e816a1
No known key found for this signature in database
GPG Key ID: 651AC83A6C6C8B96

View File

@ -10,10 +10,6 @@ pub async fn publish_cancel_transaction(
tx_cancel_sig_bob: bitcoin::Signature,
bitcoin_wallet: &bitcoin::Wallet,
) -> Result<()> {
bitcoin_wallet
.watch_until_status(&tx_lock, |status| status.is_confirmed_with(cancel_timelock))
.await?;
let tx_cancel = bitcoin::TxCancel::new(&tx_lock, cancel_timelock, a.public(), B);
// If Bob hasn't yet broadcasted the tx cancel, we do it