mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-20 03:35:55 +00:00
fix race condition in Postgres backend. add cursor to account_tx response. test script verifies account_tx
This commit is contained in:
@@ -209,7 +209,13 @@ doAccountTx(boost::json::object const& request, BackendInterface const& backend)
|
||||
txns.push_back(obj);
|
||||
}
|
||||
response["transactions"] = txns;
|
||||
response["cursor"] = {};
|
||||
if (retCursor)
|
||||
{
|
||||
boost::json::object cursorJson;
|
||||
cursorJson["ledger_sequence"] = retCursor->ledgerSequence;
|
||||
cursorJson["transaction_index"] = retCursor->transactionIndex;
|
||||
response["cursor"] = cursorJson;
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user