mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-20 19:56:00 +00:00
read only mode. ledger_data makes sure ledger is present first
This commit is contained in:
@@ -47,6 +47,12 @@ doLedgerData(
|
||||
response["error"] = "Empty database";
|
||||
return response;
|
||||
}
|
||||
auto ledger = backend.fetchLedgerBySequence(*ledgerSequence);
|
||||
if (!ledger)
|
||||
{
|
||||
response["error"] = "Ledger not found";
|
||||
return response;
|
||||
}
|
||||
|
||||
std::optional<ripple::uint256> cursor;
|
||||
if (request.contains("cursor"))
|
||||
|
||||
@@ -645,5 +645,7 @@ ReportingETL::ReportingETL(
|
||||
flatMapBackend_->open();
|
||||
if (config.contains("start_sequence"))
|
||||
startSequence_ = config.at("start_sequence").as_int64();
|
||||
if (config.contains("read_only"))
|
||||
readOnly_ = config.at("read_only").as_bool();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user