From 366a5795a8db5c298cb9b1d22eb2a3182ab1a46d Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Wed, 6 Mar 2013 13:25:40 -0800 Subject: [PATCH] Fix a bug in account_tx that Stefan reported. --- src/cpp/ripple/NetworkOPs.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cpp/ripple/NetworkOPs.cpp b/src/cpp/ripple/NetworkOPs.cpp index 2754aab45..226e50d3c 100644 --- a/src/cpp/ripple/NetworkOPs.cpp +++ b/src/cpp/ripple/NetworkOPs.cpp @@ -1066,8 +1066,9 @@ std::vector< std::pair > std::vector< std::pair > ret; std::string sql = - str(boost::format("SELECT LedgerSeq,Status,RawTxn,TxnMeta FROM Transactions where TransID in (SELECT TransID from AccountTransactions " - " WHERE Account = '%s' AND LedgerSeq <= '%d' AND LedgerSeq >= '%d' LIMIT 200) ORDER BY LedgerSeq DESC;") + str(boost::format("SELECT LedgerSeq,Status,RawTxn,TxnMeta FROM Transactions where TransID in " + "(SELECT TransID from AccountTransactions " + " WHERE Account = '%s' AND LedgerSeq <= '%d' AND LedgerSeq >= '%d' ) ORDER BY LedgerSeq DESC LIMIT 200;") % account.humanAccountID() % maxLedger % minLedger); { @@ -1103,7 +1104,7 @@ std::vector NetworkOPs::getAccountTxsB( std::string sql = str(boost::format("SELECT LedgerSeq, RawTxn,TxnMeta FROM Transactions where TransID in (SELECT TransID from AccountTransactions " - " WHERE Account = '%s' AND LedgerSeq <= '%d' AND LedgerSeq >= '%d' LIMIT 500) ORDER BY LedgerSeq DESC;") + " WHERE Account = '%s' AND LedgerSeq <= '%d' AND LedgerSeq >= '%d' ) ORDER BY LedgerSeq DESC LIMIT 500;") % account.humanAccountID() % maxLedger % minLedger); {