diff --git a/src/wallet/spend.cpp b/src/wallet/spend.cpp index 8c0d56a1cb0..62c7a90e249 100644 --- a/src/wallet/spend.cpp +++ b/src/wallet/spend.cpp @@ -275,7 +275,7 @@ CoinsResult AvailableCoins(const CWallet& wallet, if (coinControl && coinControl->HasSelected() && coinControl->IsSelected(outpoint)) continue; - if (wallet.IsLockedCoin(outpoint)) + if (wallet.IsLockedCoin(outpoint) && params.skip_locked) continue; if (wallet.IsSpent(outpoint)) diff --git a/src/wallet/spend.h b/src/wallet/spend.h index ba2c6638c83..94bf2902c1f 100644 --- a/src/wallet/spend.h +++ b/src/wallet/spend.h @@ -68,6 +68,8 @@ struct CoinFilterParams { bool only_spendable{true}; // By default, do not include immature coinbase outputs bool include_immature_coinbase{false}; + // By default, skip locked UTXOs + bool skip_locked{true}; }; /**