mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 19:15:54 +00:00
Merge branch 'master' of github.com:jedmccaleb/NewCoin
This commit is contained in:
@@ -1980,9 +1980,12 @@ Json::Value RPCServer::doTxHistory(const Json::Value& params)
|
|||||||
{
|
{
|
||||||
unsigned int startIndex = params[0u].asInt();
|
unsigned int startIndex = params[0u].asInt();
|
||||||
Json::Value obj;
|
Json::Value obj;
|
||||||
|
Json::Value txs;
|
||||||
|
|
||||||
|
obj["index"]=startIndex;
|
||||||
|
|
||||||
std::string sql =
|
std::string sql =
|
||||||
str(boost::format("SELECT * FROM Transactions ORDER BY LedgerSeq LIMIT %u,20")
|
str(boost::format("SELECT * FROM Transactions ORDER BY LedgerSeq desc LIMIT %u,20")
|
||||||
% startIndex);
|
% startIndex);
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -1992,10 +1995,12 @@ Json::Value RPCServer::doTxHistory(const Json::Value& params)
|
|||||||
SQL_FOREACH(db, sql)
|
SQL_FOREACH(db, sql)
|
||||||
{
|
{
|
||||||
Transaction::pointer trans=Transaction::transactionFromSQL(db, false);
|
Transaction::pointer trans=Transaction::transactionFromSQL(db, false);
|
||||||
if(trans) obj.append(trans->getJson(0));
|
if(trans) txs.append(trans->getJson(0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
obj["txs"]=txs;
|
||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user