|
xrpld
|
Oracle maintaining unique ledgers for a simulation. More...
#include <ledgers.h>
Public Member Functions | |
| LedgerOracle () | |
| std::optional< Ledger > | lookup (Ledger::ID const &id) const |
| Find the ledger with the given ID. | |
| Ledger | accept (Ledger const &curr, TxSetType const &txs, NetClock::duration closeTimeResolution, NetClock::time_point const &consensusCloseTime) |
| Accept the given txs and generate a new ledger. | |
| Ledger | accept (Ledger const &curr, Tx tx) |
Static Public Member Functions | |
| static std::size_t | branches (std::set< Ledger > const &ledgers) |
| Determine the number of distinct branches for the set of ledgers. | |
Private Types | |
| using | InstanceMap |
| using | InstanceEntry = InstanceMap::value_type |
Private Member Functions | |
| Ledger::ID | nextID () const |
Private Attributes | |
| InstanceMap | instances_ |
|
private |
|
private |
| xrpl::test::csf::LedgerOracle::LedgerOracle | ( | ) |
Definition at line 77 of file ledgers.cpp.
|
nodiscardprivate |
Definition at line 83 of file ledgers.cpp.
|
nodiscard |
Find the ledger with the given ID.
Definition at line 124 of file ledgers.cpp.
| Ledger xrpl::test::csf::LedgerOracle::accept | ( | Ledger const & | curr, |
| TxSetType const & | txs, | ||
| NetClock::duration | closeTimeResolution, | ||
| NetClock::time_point const & | consensusCloseTime ) |
Accept the given txs and generate a new ledger.
| curr | The current ledger |
| txs | The transactions to apply to the current ledger |
| closeTimeResolution | Resolution used in determining close time |
| consensusCloseTime | The consensus agreed close time, no valid time if 0 |
Definition at line 89 of file ledgers.cpp.
|
static |
Determine the number of distinct branches for the set of ledgers.
Ledgers A and B are on different branches if A != B, A is not an ancestor of B and B is not an ancestor of A, e.g.
/--> A O --> B
Definition at line 135 of file ledgers.cpp.
|
private |