Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcwallet.cpp
Show First 20 Lines • Show All 1,884 Lines • ▼ Show 20 Lines | static UniValue listtransactions(const Config &config, | ||||
UniValue ret(UniValue::VARR); | UniValue ret(UniValue::VARR); | ||||
const CWallet::TxItems &txOrdered = pwallet->wtxOrdered; | const CWallet::TxItems &txOrdered = pwallet->wtxOrdered; | ||||
// iterate backwards until we have nCount items to return: | // iterate backwards until we have nCount items to return: | ||||
for (CWallet::TxItems::const_reverse_iterator it = txOrdered.rbegin(); | for (CWallet::TxItems::const_reverse_iterator it = txOrdered.rbegin(); | ||||
it != txOrdered.rend(); ++it) { | it != txOrdered.rend(); ++it) { | ||||
CWalletTx *const pwtx = (*it).second.first; | CWalletTx *const pwtx = (*it).second.first; | ||||
if (pwtx != 0) { | if (pwtx != nullptr) { | ||||
ListTransactions(pwallet, *pwtx, strAccount, 0, true, ret, filter); | ListTransactions(pwallet, *pwtx, strAccount, 0, true, ret, filter); | ||||
} | } | ||||
CAccountingEntry *const pacentry = (*it).second.second; | CAccountingEntry *const pacentry = (*it).second.second; | ||||
if (pacentry != 0) { | if (pacentry != nullptr) { | ||||
AcentryToJSON(*pacentry, strAccount, ret); | AcentryToJSON(*pacentry, strAccount, ret); | ||||
} | } | ||||
if ((int)ret.size() >= (nCount + nFrom)) { | if ((int)ret.size() >= (nCount + nFrom)) { | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,796 Lines • Show Last 20 Lines |