mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Bugfixes.
This commit is contained in:
@@ -539,7 +539,7 @@ std::vector< std::pair<uint32, uint256> >
|
||||
|
||||
std::string sql =
|
||||
str(boost::format("SELECT LedgerSeq,TransID FROM AccountTransactions INDEXED BY AcctTxIndex "
|
||||
" WHERE Account = % AND LedgerSeq <= % AND LedgerSeq >= % ORDER BY LedgerSeq LIMIT 1000")
|
||||
" WHERE Account = %s AND LedgerSeq <= %d AND LedgerSeq >= %d ORDER BY LedgerSeq LIMIT 1000")
|
||||
% account.humanAccountID() % minLedger % maxLedger);
|
||||
|
||||
Database *db = theApp->getAcctTxnDB()->getDB();
|
||||
|
||||
@@ -1484,7 +1484,8 @@ Json::Value RPCServer::doAccountTransactions(Json::Value& params)
|
||||
return JSONRPCError(500, "invalid account");
|
||||
|
||||
if (!extractString(param, params, 1))
|
||||
minLedger = boost::lexical_cast<uint32>(param);
|
||||
return JSONRPCError(500, "invalid ledger index");
|
||||
minLedger = boost::lexical_cast<uint32>(param);
|
||||
|
||||
if ((params.size() == 3) && extractString(param, params, 2))
|
||||
maxLedger = boost::lexical_cast<uint32>(param);
|
||||
@@ -1492,10 +1493,15 @@ Json::Value RPCServer::doAccountTransactions(Json::Value& params)
|
||||
maxLedger = minLedger;
|
||||
|
||||
if ((maxLedger < minLedger) || (minLedger == 0) || (maxLedger == 0))
|
||||
{
|
||||
std::cerr << "minL=" << minLedger << ", maxL=" << maxLedger << std::endl;
|
||||
return JSONRPCError(500, "invalid ledger indexes");
|
||||
}
|
||||
|
||||
#ifndef DEBUG
|
||||
try
|
||||
{
|
||||
#endif
|
||||
std::vector< std::pair<uint32, uint256> > txns =
|
||||
mNetOps->getAffectedAccounts(account, minLedger, maxLedger);
|
||||
Json::Value ret(Json::objectValue);
|
||||
@@ -1529,11 +1535,13 @@ Json::Value RPCServer::doAccountTransactions(Json::Value& params)
|
||||
|
||||
ret["Ledgers"] = ledgers;
|
||||
return ret;
|
||||
#ifndef DEBUG
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
return JSONRPCError(500, "internal error");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// unl_add <domain>|<node_public> [<comment>]
|
||||
|
||||
Reference in New Issue
Block a user