From c961ae581554448a70efa763a2b031780ee05b79 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Wed, 20 Mar 2013 16:53:39 -0700 Subject: [PATCH] Ensure stable order in account tx responses. --- src/cpp/ripple/NetworkOPs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpp/ripple/NetworkOPs.cpp b/src/cpp/ripple/NetworkOPs.cpp index db8a28c0d5..26a8da1bff 100644 --- a/src/cpp/ripple/NetworkOPs.cpp +++ b/src/cpp/ripple/NetworkOPs.cpp @@ -1068,7 +1068,7 @@ std::vector< std::pair > str(boost::format("SELECT AccountTransactions.LedgerSeq,Status,RawTxn,TxnMeta FROM " "AccountTransactions INNER JOIN Transactions ON Transactions.TransID = AccountTransactions.TransID " "WHERE Account = '%s' AND AccountTransactions.LedgerSeq <= '%u' AND AccountTransactions.LedgerSeq >= '%u' " - "ORDER BY AccountTransactions.LedgerSeq DESC LIMIT 200;") + "ORDER BY AccountTransactions.LedgerSeq,AccountTransactions.TransID DESC LIMIT 200;") % account.humanAccountID() % maxLedger % minLedger); { @@ -1105,7 +1105,7 @@ std::vector NetworkOPs::getAccountTxsB( std::string sql = str(boost::format("SELECT AccountTransactions.LedgerSeq,Status,RawTxn,TxnMeta FROM " "AccountTransactions INNER JOIN Transactions ON Transactions.TransID = AccountTransactions.TransID " "WHERE Account = '%s' AND AccountTransactions.LedgerSeq <= '%u' AND AccountTransactions.LedgerSeq >= '%u' " - "ORDER BY AccountTransactions.LedgerSeq DESC LIMIT 500;") + "ORDER BY AccountTransactions.LedgerSeq,AccountTransactions.TransID DESC LIMIT 500;") % account.humanAccountID() % maxLedger % minLedger); {