Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcwallet.cpp
Show First 20 Lines • Show All 1,684 Lines • ▼ Show 20 Lines | UniValue listtransactions(const Config &config, const JSONRPCRequest &request) { | ||||
} | } | ||||
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; | ||||
if (pwtx != nullptr) { | ListTransactions(*locked_chain, pwallet, *pwtx, 0, true, ret, filter); | ||||
ListTransactions(*locked_chain, pwallet, *pwtx, 0, true, ret, | |||||
filter); | |||||
} | |||||
if ((int)ret.size() >= (nCount + nFrom)) { | if ((int)ret.size() >= (nCount + nFrom)) { | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
// ret is newest to oldest | // ret is newest to oldest | ||||
if (nFrom > (int)ret.size()) { | if (nFrom > (int)ret.size()) { | ||||
▲ Show 20 Lines • Show All 3,032 Lines • Show Last 20 Lines |