Remove GetNoteDecryptors(), lock inside FindMyNotes() instead

This commit is contained in:
Jack Grigg
2016-08-31 02:09:17 +12:00
parent de42390f90
commit 3fac1020e7
3 changed files with 3 additions and 24 deletions

View File

@@ -1030,16 +1030,15 @@ void CWallet::EraseFromWallet(const uint256 &hash)
mapNoteData_t CWallet::FindMyNotes(const CTransaction& tx) const
{
LOCK(cs_SpendingKeyStore);
uint256 hash = tx.GetTxid();
mapNoteData_t noteData;
std::set<NoteDecryptorMap::value_type> decryptors;
GetNoteDecryptors(decryptors);
libzcash::SpendingKey key;
for (size_t i = 0; i < tx.vjoinsplit.size(); i++) {
auto hSig = tx.vjoinsplit[i].h_sig(*pzcashParams, tx.joinSplitPubKey);
for (uint8_t j = 0; j < tx.vjoinsplit[i].ciphertexts.size(); j++) {
for (const NoteDecryptorMap::value_type& item : decryptors) {
for (const NoteDecryptorMap::value_type& item : mapNoteDecryptors) {
try {
auto note_pt = libzcash::NotePlaintext::decrypt(
item.second,