20#ifndef RIPPLE_APP_LEDGER_LEDGERHOLDER_H_INCLUDED
21#define RIPPLE_APP_LEDGER_LEDGERHOLDER_H_INCLUDED
23#include <xrpl/basics/CountedObject.h>
24#include <xrpl/basics/contract.h>
49 if (!ledger->isImmutable())
50 LogicError(
"LedgerHolder::set with mutable Ledger");
Tracks the number of instances of an object.
Hold a ledger in a thread-safe way.
std::shared_ptr< Ledger const > get()
void set(std::shared_ptr< Ledger const > ledger)
std::shared_ptr< Ledger const > m_heldLedger
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
void LogicError(std::string const &how) noexcept
Called when faulty logic causes a broken invariant.