mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Add a "full history" mode that causes the node to try to keep full history
going back to the genesis ledger. Not fully implemented yet.
This commit is contained in:
@@ -429,6 +429,12 @@ void Ledger::saveAcceptedLedger()
|
||||
}
|
||||
|
||||
theApp->getOPs().pubLedger(shared_from_this());
|
||||
|
||||
if(theConfig.FULL_HISTORY)
|
||||
{
|
||||
// WRITEME: check for seamless ledger history
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Ledger::pointer Ledger::getSQL(const std::string& sql)
|
||||
@@ -498,6 +504,11 @@ Ledger::pointer Ledger::loadByHash(const uint256& ledgerHash)
|
||||
return getSQL(sql);
|
||||
}
|
||||
|
||||
Ledger::pointer Ledger::getLastFullLedger()
|
||||
{
|
||||
return getSQL("SELECT * from Ledgers order by LedgerSeq desc limit 1;");
|
||||
}
|
||||
|
||||
void Ledger::addJson(Json::Value& ret, int options)
|
||||
{
|
||||
ret["ledger"] = getJson(options);
|
||||
|
||||
Reference in New Issue
Block a user