Skip to content

Commit

Permalink
Merge bitcoin#460: Show newest transactions for omni_gettradehistoryf…
Browse files Browse the repository at this point in the history
…oraddress

8746263 Show newest transactions first instead of oldest for omni_gettradehistoryforaddress (Zathras)
  • Loading branch information
dexX7 committed Mar 4, 2017
2 parents 0680230 + 8746263 commit 82ea409
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 82ea409

Please sign in to comment.