Skip to content

Commit

Permalink
anchors: dont include utxos which are csv locked
Browse files Browse the repository at this point in the history
When building a tx to spend *now* we shouldn't include CSV locked utxos
as we want them to be immediately spendable.
  • Loading branch information
niftynei authored and ShahanaFarooqui committed Sep 23, 2024
1 parent 0a6870f commit 5ae7212
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions wallet/wallet.c
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,10 @@ struct utxo **wallet_utxo_boost(const tal_t *ctx,
if (utxo_is_reserved(utxo, blockheight))
continue;

/* Don't add csv-locked ones */
if (utxo_is_csv_locked(utxo, blockheight))
continue;

/* UTXOs must be sane amounts */
if (!amount_sat_add(&new_fee_amount,
fee_amount, utxo->amount))
Expand Down

0 comments on commit 5ae7212

Please sign in to comment.