Skip to content

Commit

Permalink
Show newest transactions first instead of oldest for omni_gettradehis…
Browse files Browse the repository at this point in the history
…toryforaddress
  • Loading branch information
zathras-crypto committed Feb 28, 2017
1 parent 50d3356 commit 8746263
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/omnicore/rpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1421,7 +1421,7 @@ UniValue omni_gettradehistoryforaddress(const UniValue& params, bool fHelp)
// Populate the address trade history into JSON objects until we have processed count transactions
UniValue response(UniValue::VARR);
uint32_t processed = 0;
for(std::vector<uint256>::iterator it = vecTransactions.begin(); it != vecTransactions.end(); ++it) {
for(std::vector<uint256>::reverse_iterator it = vecTransactions.rbegin(); it != vecTransactions.rend(); ++it) {
UniValue txobj(UniValue::VOBJ);
int populateResult = populateRPCTransactionObject(*it, txobj, "", true);
if (0 == populateResult) {
Expand Down

0 comments on commit 8746263

Please sign in to comment.