mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-22 04:35:50 +00:00
Allow server to download cache from another clio server (#246)
* Allow server to download cache from another clio server * Config takes an array of clio peers. If any of these peers have a full cache, clio picks a peer at random to download the cache from. Otherwise, fall back to downloading cache from the database.
This commit is contained in:
@@ -184,6 +184,8 @@ doLedgerData(Context const& context)
|
||||
objects.push_back(toJson(sle));
|
||||
}
|
||||
response[JS(state)] = std::move(objects);
|
||||
if (outOfOrder)
|
||||
response["cache_full"] = context.backend->cache().isFull();
|
||||
auto end2 = std::chrono::system_clock::now();
|
||||
|
||||
time = std::chrono::duration_cast<std::chrono::microseconds>(end2 - end)
|
||||
|
||||
Reference in New Issue
Block a user