mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-13 17:08:54 +00:00
wallet: AvailableCoins, add arg to include/skip locked coins
This commit is contained in:
parent
f0c646f026
commit
212ccdf2c2
@ -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};
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user