Update find_unspent_notes() as mapNoteAddrs_t has been replaced by mapNoteData_t.

This commit is contained in:
Simon 2016-08-21 00:15:14 -07:00
parent dafb81614b
commit 4876de6c6d
1 changed files with 9 additions and 7 deletions

View File

@ -410,21 +410,23 @@ bool AsyncRPCOperation_sendmany::find_unspent_notes() {
if (!CheckFinalTx(wtx) || wtx.GetBlocksToMaturity() > 0 || wtx.GetDepthInMainChain() < mindepth_) if (!CheckFinalTx(wtx) || wtx.GetBlocksToMaturity() > 0 || wtx.GetDepthInMainChain() < mindepth_)
continue; continue;
mapNoteAddrs_t noteAddrs = pwalletMain->FindMyNotes(wtx); mapNoteData_t mapNoteData = pwalletMain->FindMyNotes(wtx);
if (noteAddrs.size() == 0) if (mapNoteData.size() == 0)
continue; continue;
for (auto & noteAddr : noteAddrs) { for (auto & pair : mapNoteData) {
pNoteIndex_t noteIndex = noteAddr.first; JSOutPoint jsop = pair.first;
PaymentAddress pa = noteAddr.second; CNoteData nd = pair.second;
PaymentAddress pa = nd.address;
// skip notes which belong to a different payment address in the wallet // skip notes which belong to a different payment address in the wallet
if (!(pa == frompaymentaddress_)) if (!(pa == frompaymentaddress_))
continue; continue;
int i = noteIndex.first; // Index into CTransaction.vjoinsplit int i = jsop.js; // Index into CTransaction.vjoinsplit
int j = noteIndex.second; // Index into JSDescription.ciphertexts int j = jsop.n; // Index into JSDescription.ciphertexts
// determine amount of funds in the note and if it has been spent // determine amount of funds in the note and if it has been spent
ZCNoteDecryption decryptor(spendingkey_.viewing_key()); ZCNoteDecryption decryptor(spendingkey_.viewing_key());