Auto merge of #1445 - bitcartel:master_fix_filtered_notes, r=str4d

Fix casting error in GetFilteredNotes

Use int for minDepth like upstream instead of size_t which can lead to casting problems if a wallet tx has a depth of -1.
Also don't use FindMyNotes as mapNoteData has already been set on wallet tx.

@str4d As dicussed. This should be merged before other PRs related to wallet.
This commit is contained in:
zkbot
2016-09-29 05:33:11 -04:00
4 changed files with 127 additions and 47 deletions

View File

@@ -906,7 +906,7 @@ public:
void SetBroadcastTransactions(bool broadcast) { fBroadcastTransactions = broadcast; }
/* Find notes filtered by payment address, min depth, ability to spend */
bool GetFilteredNotes(std::vector<CNotePlaintextEntry> & outEntries, std::string address, size_t minDepth, bool ignoreSpent=true);
bool GetFilteredNotes(std::vector<CNotePlaintextEntry> & outEntries, std::string address, int minDepth=1, bool ignoreSpent=true);
};