From 5ae7212e37c0f051014aea422475b91ec32b5e7c Mon Sep 17 00:00:00 2001 From: niftynei Date: Mon, 19 Aug 2024 17:24:24 -0500 Subject: [PATCH] anchors: dont include utxos which are csv locked When building a tx to spend *now* we shouldn't include CSV locked utxos as we want them to be immediately spendable. --- wallet/wallet.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wallet/wallet.c b/wallet/wallet.c index 811944c27..84a449d0a 100644 --- a/wallet/wallet.c +++ b/wallet/wallet.c @@ -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))