mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
wallet: AvailableCoins, add arg to include/skip locked coins
This commit is contained in:
parent
f0c646f026
commit
212ccdf2c2
2 changed files with 3 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue