From 8746263cff2c29b943734a4b2626ff7762c80983 Mon Sep 17 00:00:00 2001 From: Zathras Date: Tue, 28 Feb 2017 17:32:01 +1100 Subject: [PATCH] Show newest transactions first instead of oldest for omni_gettradehistoryforaddress --- src/omnicore/rpc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/omnicore/rpc.cpp b/src/omnicore/rpc.cpp index 0a1a97d400566..08c24cf803785 100644 --- a/src/omnicore/rpc.cpp +++ b/src/omnicore/rpc.cpp @@ -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::iterator it = vecTransactions.begin(); it != vecTransactions.end(); ++it) { + for(std::vector::reverse_iterator it = vecTransactions.rbegin(); it != vecTransactions.rend(); ++it) { UniValue txobj(UniValue::VOBJ); int populateResult = populateRPCTransactionObject(*it, txobj, "", true); if (0 == populateResult) {