rippled
|
Oracle maintaining unique ledgers for a simulation. More...
Public Member Functions | |
LedgerOracle () | |
std::optional< Ledger > | lookup (Ledger::ID const &id) const |
Find the ledger with the given ID. More... | |
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. More... | |
Ledger | accept (Ledger const &curr, Tx tx) |
std::size_t | branches (std::set< Ledger > const &ledgers) const |
Determine the number of distinct branches for the set of ledgers. More... | |
Private Types | |
using | InstanceMap = boost::bimaps::bimap< boost::bimaps::set_of< Ledger::Instance, ripple::less< Ledger::Instance > >, boost::bimaps::set_of< Ledger::ID, ripple::less< Ledger::ID > >> |
using | InstanceEntry = InstanceMap::value_type |
Private Member Functions | |
Ledger::ID | nextID () const |
Private Attributes | |
InstanceMap | instances_ |
|
private |
|
private |
ripple::test::csf::LedgerOracle::LedgerOracle | ( | ) |
Definition at line 85 of file ledgers.cpp.
|
private |
Definition at line 91 of file ledgers.cpp.
std::optional< Ledger > ripple::test::csf::LedgerOracle::lookup | ( | Ledger::ID const & | id | ) | const |
Find the ledger with the given ID.
Definition at line 129 of file ledgers.cpp.
Ledger ripple::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 97 of file ledgers.cpp.
std::size_t ripple::test::csf::LedgerOracle::branches | ( | std::set< Ledger > const & | ledgers | ) | const |
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 140 of file ledgers.cpp.
|
private |