src/wallet/wallet.cpp
/**
 * Finds all output notes in the given transaction that have been sent to
 * PaymentAddresses in this wallet.
 *
 * It should never be necessary to call this method with a CWalletTx, because
 * the result of FindMySproutNotes (for the addresses available at the time) will
 * already have been cached in CWalletTx.mapSproutNoteData.
 */
Finds all output notes in the given transaction that have been sent to
PaymentAddresses in this wallet.

It should never be necessary to call this method with a CWalletTx, because
the result of FindMySproutNotes (for the addresses available at the time) will
already have been cached in CWalletTx.mapSproutNoteData.
Finds all output notes in the given transaction that have been sent to PaymentAddresses in this wallet . It should never be necessary to call this method with a CWalletTx because the result of FindMySproutNotes ( for the addresses available at the time ) will already have been cached in CWalletTx . mapSproutNoteData .
mapSproutNoteData_t CWallet::FindMySproutNotes(const CTransaction &tx) const
{
    LOCK(cs_SpendingKeyStore);
    uint256 hash = tx.GetHash();
    mapSproutNoteData_t noteData;
    for (size_t i = 0; i < tx.vJoinSplit.size(); i++) {
        auto hSig = tx.vJoinSplit[i].h_sig(*pzelcashParams, tx.joinSplitPubKey);
        for (uint8_t j = 0; j < tx.vJoinSplit[i].ciphertexts.size(); j++) {
            for (const NoteDecryptorMap::value_type& item : mapNoteDecryptors) {
                try {
                    auto address = item.first;
                    JSOutPoint jsoutpt {hash, i, j};
                    auto nullifier = GetSproutNoteNullifier(
                        tx.vJoinSplit[i],
                        address,
                        item.second,
                        hSig, j);
                    if (nullifier) {
                        SproutNoteData nd {address, *nullifier};
                        noteData.insert(std::make_pair(jsoutpt, nd));
                    } else {
                        SproutNoteData nd {address};
                        noteData.insert(std::make_pair(jsoutpt, nd));
                    }
                    break;
                } catch (const note_decryption_failed &err) {
                } catch (const std::exception &exc) {
                    LogPrintf("FindMySproutNotes(): Unexpected error while testing decrypt:\n");
                    LogPrintf("%s\n", exc.what());
                }
            }
        }
    }
    return noteData;
}
mapSproutNoteData_t CWallet :: FindMySproutNotes ( const CTransaction & tx ) const { LOCK ( cs_SpendingKeyStore ) ; uint256 hash = tx . GetHash ( ) ; mapSproutNoteData_t noteData ; for ( size_t i = 0 ; i < tx . vJoinSplit . size ( ) ; i ++ ) { auto hSig = tx . vJoinSplit [ i ] . h_sig ( * pzelcashParams , tx . joinSplitPubKey ) ; for ( uint8_t j = 0 ; j < tx . vJoinSplit [ i ] . ciphertexts . size ( ) ; j ++ ) { for ( const NoteDecryptorMap :: value_type & item : mapNoteDecryptors ) { try { auto address = item . first ; JSOutPoint jsoutpt { hash , i , j } ; auto nullifier = GetSproutNoteNullifier ( tx . vJoinSplit [ i ] , address , item . second , hSig , j ) ; if ( nullifier ) { SproutNoteData nd { address , * nullifier } ; noteData . insert ( std :: make_pair ( jsoutpt , nd ) ) ; } else { SproutNoteData nd { address } ; noteData . insert ( std :: make_pair ( jsoutpt , nd ) ) ; } break ; } catch ( const note_decryption_failed & err ) { } catch ( const std :: exception & exc ) { LogPrintf ( " \n " ) ; LogPrintf ( " \n " , exc . what ( ) ) ; } } } } return noteData ; }
Finds all output notes in the given transaction that have been sent to
 PaymentAddresses in this wallet.
Finds all output notes in the given transaction that have been sent to PaymentAddresses in this wallet .
// Couldn't decrypt with this decryptor // Unexpected failure