Skip to content

Commit 0c027cf

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 c28cce2 commit 0c027cf

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
@@ -404,6 +404,10 @@ where
404404
);
405405
e
406406
})?;
407+
408+
// 'cancel' the transaction to free up any used change addresses
409+
locked_wallet.cancel_tx(&tmp_tx);
410+
407411
let estimated_spendable_amount = Amount::from_sat(
408412
spendable_amount_sats.saturating_sub(estimated_tx_fee.to_sat()),
409413
);

0 commit comments

Comments
 (0)