mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Ensure account_tx queries over and returns correct range
This commit is contained in:
@@ -69,8 +69,10 @@ Json::Value doAccountTx (RPC::Context& context)
|
||||
std::int64_t iLedgerMax = params.isMember ("ledger_index_max")
|
||||
? params["ledger_index_max"].asInt () : -1;
|
||||
|
||||
uLedgerMin = iLedgerMin == -1 ? uValidatedMin : iLedgerMin;
|
||||
uLedgerMax = iLedgerMax == -1 ? uValidatedMax : iLedgerMax;
|
||||
uLedgerMin = iLedgerMin == -1 ? uValidatedMin :
|
||||
((iLedgerMin >= uValidatedMin) ? iLedgerMin : uValidatedMin);
|
||||
uLedgerMax = iLedgerMax == -1 ? uValidatedMax :
|
||||
((iLedgerMax <= uValidatedMax) ? iLedgerMax : uValidatedMax);
|
||||
|
||||
if (uLedgerMax < uLedgerMin)
|
||||
return rpcError (rpcLGR_IDXS_INVALID);
|
||||
|
||||
Reference in New Issue
Block a user