This commit is contained in:
jl777
2018-12-10 11:35:11 -11:00
parent 7883afa7fe
commit 181d6b33f3
2 changed files with 9 additions and 2 deletions

View File

@@ -1817,7 +1817,7 @@ UniValue listtransactions(const UniValue& params, bool fHelp)
CWalletTx *const pwtx = (*it).second.first;
if (pwtx != 0)
ListTransactions(*pwtx, strAccount, 0, true, ret, filter);
else fprintf(stderr,"null pwtx\n");
//else fprintf(stderr,"null pwtx\n");
CAccountingEntry *const pacentry = (*it).second.second;
if (pacentry != 0)
AcentryToJSON(*pacentry, strAccount, ret);

View File

@@ -2533,11 +2533,16 @@ void CWalletTx::GetAmounts(list<COutputEntry>& listReceived,
{
// Don't report 'change' txouts
if (!(filter & ISMINE_CHANGE) && pwallet->IsChange(txout))
{
fprintf(stderr,"skip change vout\n");
continue;
}
}
else if (!(fIsMine & filter))
{
fprintf(stderr,"skip filtered vout %d %d\n",(int32_t)fIsMine,(int32_t)filter);
continue;
}
// In either case, we need to get the destination address
CTxDestination address;
if (!ExtractDestination(txout.scriptPubKey, address))
@@ -2551,10 +2556,12 @@ void CWalletTx::GetAmounts(list<COutputEntry>& listReceived,
// If we are debited by the transaction, add the output as a "sent" entry
if (nDebit > 0)
listSent.push_back(output);
else fprintf(stderr,"not sent vout %d %d\n",(int32_t)fIsMine,(int32_t)filter);
// If we are receiving the output, add it as a "received" entry
if (fIsMine & filter)
listReceived.push_back(output);
else fprintf(stderr,"not received vout %d %d\n",(int32_t)fIsMine,(int32_t)filter);
}
}