Rename GetUnspentNotes to GetFilteredNotes
Added parameter to ignore spent notes, which is true by default.
This commit is contained in:
@@ -3187,7 +3187,7 @@ bool CMerkleTx::AcceptToMemoryPool(bool fLimitFree, bool fRejectAbsurdFee)
|
||||
return ::AcceptToMemoryPool(mempool, state, *this, fLimitFree, NULL, fRejectAbsurdFee);
|
||||
}
|
||||
|
||||
bool CWallet::GetUnspentNotes(std::vector<CNotePlaintextEntry> & outEntries, std::string address, size_t minDepth = 1)
|
||||
bool CWallet::GetFilteredNotes(std::vector<CNotePlaintextEntry> & outEntries, std::string address, size_t minDepth = 1, bool ignoreSpent)
|
||||
{
|
||||
bool fFilterAddress = false;
|
||||
libzcash::PaymentAddress filterPaymentAddress;
|
||||
@@ -3223,7 +3223,7 @@ bool CWallet::GetUnspentNotes(std::vector<CNotePlaintextEntry> & outEntries, std
|
||||
}
|
||||
|
||||
// skip note which has been spent
|
||||
if (IsSpent(nd.nullifier)) {
|
||||
if (ignoreSpent && IsSpent(nd.nullifier)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user