wallet: AvailableCoins, add arg to include/skip locked coins
This commit is contained in:
2 files changed
+3
-1
No files matched your search
@@ -275,7 +275,7 @@ CoinsResult AvailableCoins(const CWallet& wallet,
|
|||||||
if (coinControl && coinControl->HasSelected() && coinControl->IsSelected(outpoint))
|
if (coinControl && coinControl->HasSelected() && coinControl->IsSelected(outpoint))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (wallet.IsLockedCoin(outpoint))
|
if (wallet.IsLockedCoin(outpoint) && params.skip_locked)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (wallet.IsSpent(outpoint))
|
if (wallet.IsSpent(outpoint))
|
||||||
|
|||||||
@@ -68,6 +68,8 @@ struct CoinFilterParams {
|
|||||||
bool only_spendable{true};
|
bool only_spendable{true};
|
||||||
// By default, do not include immature coinbase outputs
|
// By default, do not include immature coinbase outputs
|
||||||
bool include_immature_coinbase{false};
|
bool include_immature_coinbase{false};
|
||||||
|
// By default, skip locked UTXOs
|
||||||
|
bool skip_locked{true};
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in new issue
Block a user