|
| | InboundLedgersImp (Application &app, clock_type &clock, beast::insight::Collector::ptr const &collector, std::unique_ptr< PeerSetBuilder > peerSetBuilder) |
| |
| std::shared_ptr< Ledger const > | acquire (uint256 const &hash, std::uint32_t seq, InboundLedger::Reason reason) override |
| |
| void | acquireAsync (uint256 const &hash, std::uint32_t seq, InboundLedger::Reason reason) override |
| |
| std::shared_ptr< InboundLedger > | find (uint256 const &hash) override |
| |
| bool | gotLedgerData (LedgerHash const &hash, std::shared_ptr< Peer > peer, std::shared_ptr< protocol::TMLedgerData > packet) override |
| | We received a TMLedgerData from a peer.
|
| |
| void | logFailure (uint256 const &h, std::uint32_t seq) override |
| |
| bool | isFailure (uint256 const &h) override |
| |
| void | gotStaleData (std::shared_ptr< protocol::TMLedgerData > packet_ptr) override |
| | We got some data for a ledger we are no longer acquiring Since we paid the price to receive it, we might as well stash it in case we need it.
|
| |
| void | clearFailures () override |
| |
| std::size_t | fetchRate () override |
| | Returns the rate of historical ledger fetches per minute.
|
| |
| void | onLedgerFetched () override |
| | Called when a complete ledger is obtained.
|
| |
| Json::Value | getInfo () override |
| |
| void | gotFetchPack () override |
| |
| void | sweep () override |
| |
| void | stop () override |
| |
| std::size_t | cacheSize () override |
| |
| virtual std::shared_ptr< InboundLedger > | find (LedgerHash const &hash)=0 |
| |
Definition at line 21 of file InboundLedgers.cpp.
◆ ScopedLockType
◆ MapType
◆ clock_type
◆ InboundLedgersImp()
◆ acquire()
◆ acquireAsync()
◆ find() [1/2]
◆ gotLedgerData()
◆ logFailure()
◆ isFailure()
| bool xrpl::InboundLedgersImp::isFailure |
( |
uint256 const & |
h | ) |
|
|
overridevirtual |
◆ gotStaleData()
| void xrpl::InboundLedgersImp::gotStaleData |
( |
std::shared_ptr< protocol::TMLedgerData > |
packet_ptr | ) |
|
|
overridevirtual |
We got some data for a ledger we are no longer acquiring Since we paid the price to receive it, we might as well stash it in case we need it.
Nodes are received in wire format and must be stashed/hashed in prefix format
Implements xrpl::InboundLedgers.
Definition at line 242 of file InboundLedgers.cpp.
◆ clearFailures()
| void xrpl::InboundLedgersImp::clearFailures |
( |
| ) |
|
|
overridevirtual |
◆ fetchRate()
◆ onLedgerFetched()
| void xrpl::InboundLedgersImp::onLedgerFetched |
( |
| ) |
|
|
overridevirtual |
◆ getInfo()
◆ gotFetchPack()
| void xrpl::InboundLedgersImp::gotFetchPack |
( |
| ) |
|
|
overridevirtual |
◆ sweep()
| void xrpl::InboundLedgersImp::sweep |
( |
| ) |
|
|
overridevirtual |
◆ stop()
| void xrpl::InboundLedgersImp::stop |
( |
| ) |
|
|
overridevirtual |
◆ cacheSize()
◆ find() [2/2]
◆ app_
◆ fetchRateMutex_
| std::mutex xrpl::InboundLedgersImp::fetchRateMutex_ |
|
private |
◆ fetchRate_
◆ j_
◆ kReacquireInterval
◆ m_clock
◆ mLock
◆ stopping_
| bool xrpl::InboundLedgersImp::stopping_ = false |
|
private |
◆ mLedgers
| MapType xrpl::InboundLedgersImp::mLedgers |
|
private |
◆ mRecentFailures
◆ mCounter
◆ mPeerSetBuilder
◆ pendingAcquires_
◆ acquiresMutex_
| std::mutex xrpl::InboundLedgersImp::acquiresMutex_ |
|
private |