3#include <xrpl/ledger/Ledger.h>
24 ServiceRegistry& registry,
40 LedgerHeader
const& info,
43 ServiceRegistry& registry,
60 ServiceRegistry& registry,
77 ServiceRegistry& registry,
88getLatestLedger(Rules
const& rules, Fees
const& fees, ServiceRegistry& registry);
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::tuple< std::shared_ptr< Ledger >, std::uint32_t, uint256 > getLatestLedger(Rules const &rules, Fees const &fees, ServiceRegistry ®istry)
Fetch the ledger with the highest sequence contained in the database.
bool isCurrent(ValidationParms const &p, NetClock::time_point now, NetClock::time_point signTime, NetClock::time_point seenTime)
Whether a validation is still current.
bool pendSaveValidated(ServiceRegistry ®istry, std::shared_ptr< Ledger const > const &ledger, bool isSynchronous, bool isCurrent)
Save, or arrange to save, a fully-validated ledger.
std::shared_ptr< Ledger > loadLedgerHelper(LedgerHeader const &info, Rules const &rules, Fees const &fees, ServiceRegistry ®istry, bool acquire)
Make ledger using info loaded from database.
std::shared_ptr< Ledger > loadByIndex(std::uint32_t ledgerIndex, Rules const &rules, Fees const &fees, ServiceRegistry ®istry, bool acquire)
Load a ledger by its sequence number.
std::shared_ptr< Ledger > loadByHash(uint256 const &ledgerHash, Rules const &rules, Fees const &fees, ServiceRegistry ®istry, bool acquire)
Load a ledger by its hash.