mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-03 04:52:50 +02:00
wallet: AvailableCoins, add arg to include/skip locked coins
This commit is contained in:
@@ -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))
|
||||
|
@@ -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};
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user