Rename GetUnspentNotes to GetFilteredNotes

Added parameter to ignore spent notes, which is true by default.
This commit is contained in:
Simon
2016-09-07 16:07:26 -07:00
parent 6d2d045c6b
commit 1b141933e5
5 changed files with 10 additions and 10 deletions

View File

@@ -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;
}