Skip to content

Commit 1e5f4a2

Browse files
committed
Call Wallet::cancel_tx for temporary transactions
We create temporary transactions for fee estimation purposes. Doing this might advance the descriptor state though. So here we call `cancel_tx` to tell the wallet we no longer intend to broadcast the temporary transactions.
1 parent afe9994 commit 1e5f4a2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/wallet/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,10 @@ where
403403
);
404404
e
405405
})?;
406+
407+
// 'cancel' the transaction to free up any used change addresses
408+
locked_wallet.cancel_tx(&tmp_tx);
409+
406410
let estimated_spendable_amount = Amount::from_sat(
407411
spendable_amount_sats.saturating_sub(estimated_tx_fee.to_sat()),
408412
);

0 commit comments

Comments
 (0)