|
rippled
|
#include <LedgerMaster.h>


Classes | |
| struct | Stats |
Definition at line 31 of file LedgerMaster.h.
|
explicit |
Definition at line 79 of file LedgerMaster.cpp.
|
virtualdefault |
| LedgerIndex xrpl::LedgerMaster::getCurrentLedgerIndex | ( | ) |
Definition at line 97 of file LedgerMaster.cpp.
| LedgerIndex xrpl::LedgerMaster::getValidLedgerIndex | ( | ) |
Definition at line 103 of file LedgerMaster.cpp.
| bool xrpl::LedgerMaster::isCompatible | ( | ReadView const & | view, |
| beast::Journal::Stream | s, | ||
| char const * | reason | ||
| ) |
Definition at line 109 of file LedgerMaster.cpp.
| std::recursive_mutex & xrpl::LedgerMaster::peekMutex | ( | ) |
Definition at line 1437 of file LedgerMaster.cpp.
| std::shared_ptr< ReadView const > xrpl::LedgerMaster::getCurrentLedger | ( | ) |
Definition at line 1444 of file LedgerMaster.cpp.
| std::shared_ptr< Ledger const > xrpl::LedgerMaster::getClosedLedger | ( | ) |
Definition at line 59 of file LedgerMaster.h.
| std::shared_ptr< Ledger const > xrpl::LedgerMaster::getValidatedLedger | ( | ) |
Definition at line 1450 of file LedgerMaster.cpp.
| Rules xrpl::LedgerMaster::getValidatedRules | ( | ) |
Definition at line 1456 of file LedgerMaster.cpp.
| std::shared_ptr< ReadView const > xrpl::LedgerMaster::getPublishedLedger | ( | ) |
Definition at line 1471 of file LedgerMaster.cpp.
| std::chrono::seconds xrpl::LedgerMaster::getPublishedLedgerAge | ( | ) |
Definition at line 132 of file LedgerMaster.cpp.
| std::chrono::seconds xrpl::LedgerMaster::getValidatedLedgerAge | ( | ) |
Definition at line 156 of file LedgerMaster.cpp.
| bool xrpl::LedgerMaster::isCaughtUp | ( | std::string & | reason | ) |
Definition at line 181 of file LedgerMaster.cpp.
| std::uint32_t xrpl::LedgerMaster::getEarliestFetch | ( | ) |
Definition at line 566 of file LedgerMaster.cpp.
| bool xrpl::LedgerMaster::storeLedger | ( | std::shared_ptr< Ledger const > | ledger | ) |
Definition at line 398 of file LedgerMaster.cpp.
| void xrpl::LedgerMaster::setFullLedger | ( | std::shared_ptr< Ledger const > const & | ledger, |
| bool | isSynchronous, | ||
| bool | isCurrent | ||
| ) |
Definition at line 746 of file LedgerMaster.cpp.
| bool xrpl::LedgerMaster::canBeCurrent | ( | std::shared_ptr< Ledger const > const & | ledger | ) |
Check the sequence number and parent close time of a ledger against our clock and last validated ledger to see if it can be the network's current ledger.
Definition at line 304 of file LedgerMaster.cpp.
| void xrpl::LedgerMaster::switchLCL | ( | std::shared_ptr< Ledger const > const & | lastClosed | ) |
Definition at line 366 of file LedgerMaster.cpp.
| void xrpl::LedgerMaster::failedSave | ( | std::uint32_t | seq, |
| uint256 const & | hash | ||
| ) |
Definition at line 801 of file LedgerMaster.cpp.
| std::string xrpl::LedgerMaster::getCompleteLedgers | ( | ) |
Definition at line 1478 of file LedgerMaster.cpp.
| void xrpl::LedgerMaster::applyHeldTransactions | ( | ) |
Apply held transactions to the open ledger This is normally called as we close the ledger.
The open ledger remains open to handle new transactions until a new open ledger is built.
Definition at line 411 of file LedgerMaster.cpp.
| std::shared_ptr< STTx const > xrpl::LedgerMaster::popAcctTransaction | ( | std::shared_ptr< STTx const > const & | tx | ) |
Get the next transaction held for a particular account if any.
This is normally called when a transaction for that account is successfully applied to the open ledger so the next transaction can be resubmitted without waiting for ledger close.
Definition at line 427 of file LedgerMaster.cpp.
| uint256 xrpl::LedgerMaster::getHashBySeq | ( | std::uint32_t | index | ) |
Get a ledger's hash by sequence number using the cache.
Definition at line 1511 of file LedgerMaster.cpp.
| std::optional< LedgerHash > xrpl::LedgerMaster::walkHashBySeq | ( | std::uint32_t | index, |
| InboundLedger::Reason | reason | ||
| ) |
Walk to a ledger's hash using the skip list.
Definition at line 1522 of file LedgerMaster.cpp.
| std::optional< LedgerHash > xrpl::LedgerMaster::walkHashBySeq | ( | std::uint32_t | index, |
| std::shared_ptr< ReadView const > const & | referenceLedger, | ||
| InboundLedger::Reason | reason | ||
| ) |
Walk the chain of ledger hashes to determine the hash of the ledger with the specified index.
The referenceLedger is used as the base of the chain and should be fully validated and must not precede the target index. This function may throw if nodes from the reference ledger or any prior ledger are not present in the node store.
Definition at line 1533 of file LedgerMaster.cpp.
| std::shared_ptr< Ledger const > xrpl::LedgerMaster::getLedgerBySeq | ( | std::uint32_t | index | ) |
Definition at line 1588 of file LedgerMaster.cpp.
| std::shared_ptr< Ledger const > xrpl::LedgerMaster::getLedgerByHash | ( | uint256 const & | hash | ) |
Definition at line 1624 of file LedgerMaster.cpp.
| void xrpl::LedgerMaster::setLedgerRangePresent | ( | std::uint32_t | minV, |
| std::uint32_t | maxV | ||
| ) |
Definition at line 1637 of file LedgerMaster.cpp.
| std::optional< NetClock::time_point > xrpl::LedgerMaster::getCloseTimeBySeq | ( | LedgerIndex | ledgerIndex | ) |
Definition at line 1485 of file LedgerMaster.cpp.
| std::optional< NetClock::time_point > xrpl::LedgerMaster::getCloseTimeByHash | ( | LedgerHash const & | ledgerHash, |
| LedgerIndex | ledgerIndex | ||
| ) |
Definition at line 1492 of file LedgerMaster.cpp.
| void xrpl::LedgerMaster::addHeldTransaction | ( | std::shared_ptr< Transaction > const & | trans | ) |
Definition at line 294 of file LedgerMaster.cpp.
| void xrpl::LedgerMaster::fixMismatch | ( | ReadView const & | ledger | ) |
Definition at line 695 of file LedgerMaster.cpp.
| bool xrpl::LedgerMaster::haveLedger | ( | std::uint32_t | seq | ) |
Definition at line 441 of file LedgerMaster.cpp.
| void xrpl::LedgerMaster::clearLedger | ( | std::uint32_t | seq | ) |
Definition at line 448 of file LedgerMaster.cpp.
| bool xrpl::LedgerMaster::isValidated | ( | ReadView const & | ledger | ) |
Definition at line 455 of file LedgerMaster.cpp.
| bool xrpl::LedgerMaster::getValidatedRange | ( | std::uint32_t & | minVal, |
| std::uint32_t & | maxVal | ||
| ) |
Definition at line 525 of file LedgerMaster.cpp.
| bool xrpl::LedgerMaster::getFullValidatedRange | ( | std::uint32_t & | minVal, |
| std::uint32_t & | maxVal | ||
| ) |
Definition at line 500 of file LedgerMaster.cpp.
| void xrpl::LedgerMaster::sweep | ( | ) |
Definition at line 1644 of file LedgerMaster.cpp.
| float xrpl::LedgerMaster::getCacheHitRate | ( | ) |
Definition at line 1651 of file LedgerMaster.cpp.
| void xrpl::LedgerMaster::checkAccept | ( | std::shared_ptr< Ledger const > const & | ledger | ) |
Definition at line 869 of file LedgerMaster.cpp.
| void xrpl::LedgerMaster::checkAccept | ( | uint256 const & | hash, |
| std::uint32_t | seq | ||
| ) |
Definition at line 810 of file LedgerMaster.cpp.
| void xrpl::LedgerMaster::consensusBuilt | ( | std::shared_ptr< Ledger const > const & | ledger, |
| uint256 const & | consensusHash, | ||
| Json::Value | consensus | ||
| ) |
Report that the consensus process built a particular ledger.
Definition at line 1007 of file LedgerMaster.cpp.
| void xrpl::LedgerMaster::setBuildingLedger | ( | LedgerIndex | index | ) |
Definition at line 435 of file LedgerMaster.cpp.
| void xrpl::LedgerMaster::tryAdvance | ( | ) |
Definition at line 1259 of file LedgerMaster.cpp.
| bool xrpl::LedgerMaster::newPathRequest | ( | ) |
Definition at line 1391 of file LedgerMaster.cpp.
| bool xrpl::LedgerMaster::isNewPathRequest | ( | ) |
Definition at line 1399 of file LedgerMaster.cpp.
| bool xrpl::LedgerMaster::newOrderBookDB | ( | ) |
Definition at line 1410 of file LedgerMaster.cpp.
| bool xrpl::LedgerMaster::fixIndex | ( | LedgerIndex | ledgerIndex, |
| LedgerHash const & | ledgerHash | ||
| ) |
Definition at line 392 of file LedgerMaster.cpp.
| void xrpl::LedgerMaster::clearPriorLedgers | ( | LedgerIndex | seq | ) |
Definition at line 1657 of file LedgerMaster.cpp.
| void xrpl::LedgerMaster::clearLedgerCachePrior | ( | LedgerIndex | seq | ) |
Definition at line 1665 of file LedgerMaster.cpp.
| void xrpl::LedgerMaster::takeReplay | ( | std::unique_ptr< LedgerReplay > | replay | ) |
Definition at line 1671 of file LedgerMaster.cpp.
| std::unique_ptr< LedgerReplay > xrpl::LedgerMaster::releaseReplay | ( | ) |
Definition at line 1677 of file LedgerMaster.cpp.
| void xrpl::LedgerMaster::gotFetchPack | ( | bool | progress, |
| std::uint32_t | seq | ||
| ) |
Definition at line 1879 of file LedgerMaster.cpp.
| void xrpl::LedgerMaster::addFetchPack | ( | uint256 const & | hash, |
| std::shared_ptr< Blob > | data | ||
| ) |
Definition at line 1860 of file LedgerMaster.cpp.
|
overridevirtual |
Retrieves partial ledger data of the corresponding hash from peers.
`
| nodeHash | The 256-bit hash of the data to fetch. |
std::nullopt if the hash isn't cached, otherwise, the hash associated data. Implements xrpl::AbstractFetchPackContainer.
Definition at line 1866 of file LedgerMaster.cpp.
| void xrpl::LedgerMaster::makeFetchPack | ( | std::weak_ptr< Peer > const & | wPeer, |
| std::shared_ptr< protocol::TMGetObjectByHash > const & | request, | ||
| uint256 | haveLedgerHash, | ||
| UptimeClock::time_point | uptime | ||
| ) |
Definition at line 1947 of file LedgerMaster.cpp.
| std::size_t xrpl::LedgerMaster::getFetchPackCacheSize | ( | ) | const |
Definition at line 2071 of file LedgerMaster.cpp.
| bool xrpl::LedgerMaster::haveValidated | ( | ) |
Whether we have ever fully validated a ledger.
Definition at line 239 of file LedgerMaster.h.
| std::optional< LedgerIndex > xrpl::LedgerMaster::minSqlSeq | ( | ) |
Definition at line 2078 of file LedgerMaster.cpp.
| std::optional< uint256 > xrpl::LedgerMaster::txnIdFromIndex | ( | uint32_t | ledgerSeq, |
| uint32_t | txnIndex | ||
| ) |
Definition at line 2084 of file LedgerMaster.cpp.
|
private |
Definition at line 206 of file LedgerMaster.cpp.
|
private |
Definition at line 286 of file LedgerMaster.cpp.
|
private |
Definition at line 580 of file LedgerMaster.cpp.
|
private |
Request a fetch pack to get to the specified ledger.
Definition at line 648 of file LedgerMaster.cpp.
|
private |
Definition at line 1106 of file LedgerMaster.cpp.
|
private |
Determines how many validations are needed to fully validate a ledger.
Definition at line 863 of file LedgerMaster.cpp.
|
private |
Definition at line 1683 of file LedgerMaster.cpp.
|
private |
Definition at line 1777 of file LedgerMaster.cpp.
|
private |
Definition at line 1126 of file LedgerMaster.cpp.
|
private |
Definition at line 1291 of file LedgerMaster.cpp.
|
private |
A thread needs to be dispatched to handle pathfinding work of some kind.
Definition at line 1421 of file LedgerMaster.cpp.
|
private |
Definition at line 384 of file LedgerMaster.h.
|
private |
Definition at line 291 of file LedgerMaster.h.
|
private |
Definition at line 292 of file LedgerMaster.h.
|
mutableprivate |
Definition at line 294 of file LedgerMaster.h.
|
private |
Definition at line 297 of file LedgerMaster.h.
|
private |
Definition at line 300 of file LedgerMaster.h.
|
private |
Definition at line 303 of file LedgerMaster.h.
|
private |
Definition at line 306 of file LedgerMaster.h.
|
private |
Definition at line 309 of file LedgerMaster.h.
|
private |
Definition at line 312 of file LedgerMaster.h.
|
private |
Definition at line 314 of file LedgerMaster.h.
|
private |
Definition at line 316 of file LedgerMaster.h.
|
private |
Definition at line 319 of file LedgerMaster.h.
|
private |
Definition at line 321 of file LedgerMaster.h.
|
private |
Definition at line 322 of file LedgerMaster.h.
|
private |
Definition at line 325 of file LedgerMaster.h.
|
private |
Definition at line 328 of file LedgerMaster.h.
|
private |
Definition at line 329 of file LedgerMaster.h.
|
private |
Definition at line 331 of file LedgerMaster.h.
|
private |
Definition at line 332 of file LedgerMaster.h.
|
private |
Definition at line 334 of file LedgerMaster.h.
|
private |
Definition at line 336 of file LedgerMaster.h.
|
private |
Definition at line 337 of file LedgerMaster.h.
|
private |
Definition at line 338 of file LedgerMaster.h.
|
private |
Definition at line 339 of file LedgerMaster.h.
|
private |
Definition at line 340 of file LedgerMaster.h.
|
private |
Definition at line 343 of file LedgerMaster.h.
|
private |
Definition at line 346 of file LedgerMaster.h.
|
private |
Definition at line 349 of file LedgerMaster.h.
|
private |
Definition at line 351 of file LedgerMaster.h.
|
private |
Definition at line 353 of file LedgerMaster.h.
|
private |
Definition at line 355 of file LedgerMaster.h.
|
private |
Definition at line 359 of file LedgerMaster.h.
|
private |
Definition at line 362 of file LedgerMaster.h.
|
private |
Definition at line 380 of file LedgerMaster.h.