|
xrpld
|


Public Types | |
| using | ClockType = beast::AbstractClock<std::chrono::steady_clock> |
Public Member Functions | |
| InboundLedgersImp (Application &app, ClockType &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 > packetPtr) 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 |
Static Public Attributes | |
| static constexpr std::chrono::minutes | kReacquireInterval {5} |
Private Types | |
| using | ScopedLockType = std::unique_lock<std::recursive_mutex> |
| using | MapType = HashMap<UInt256, std::shared_ptr<InboundLedger>> |
Private Attributes | |
| Application & | app_ |
| std::mutex | fetchRateMutex_ |
| DecayWindow< 30, ClockType > | fetchRate_ |
| beast::Journal const | j_ |
| ClockType & | clock_ |
| std::recursive_mutex | lock_ |
| bool | stopping_ = false |
| MapType | ledgers_ |
| beast::AgedMap< UInt256, std::uint32_t > | recentFailures_ |
| beast::insight::Counter | counter_ |
| std::unique_ptr< PeerSetBuilder > | peerSetBuilder_ |
| std::set< UInt256 > | pendingAcquires_ |
| std::mutex | acquiresMutex_ |
Definition at line 45 of file InboundLedgers.cpp.
|
private |
Definition at line 435 of file InboundLedgers.cpp.
|
private |
Definition at line 439 of file InboundLedgers.cpp.
|
inherited |
Definition at line 31 of file InboundLedgers.h.
| xrpl::InboundLedgersImp::InboundLedgersImp | ( | Application & | app, |
| ClockType & | clock, | ||
| beast::insight::Collector::Ptr const & | collector, | ||
| std::unique_ptr< PeerSetBuilder > | peerSetBuilder ) |
Definition at line 58 of file InboundLedgers.cpp.
|
overridevirtual |
Implements xrpl::InboundLedgers.
Definition at line 77 of file InboundLedgers.cpp.

|
overridevirtual |
Implements xrpl::InboundLedgers.
Definition at line 132 of file InboundLedgers.cpp.
|
override |
Definition at line 156 of file InboundLedgers.cpp.
|
overridevirtual |
We received a TMLedgerData from a peer.
Implements xrpl::InboundLedgers.
Definition at line 191 of file InboundLedgers.cpp.
|
overridevirtual |
Implements xrpl::InboundLedgers.
Definition at line 226 of file InboundLedgers.cpp.
|
overridevirtual |
Implements xrpl::InboundLedgers.
Definition at line 234 of file InboundLedgers.cpp.
|
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 250 of file InboundLedgers.cpp.
|
overridevirtual |
Implements xrpl::InboundLedgers.
Definition at line 274 of file InboundLedgers.cpp.
|
overridevirtual |
Returns the rate of historical ledger fetches per minute.
Implements xrpl::InboundLedgers.
Definition at line 283 of file InboundLedgers.cpp.
|
overridevirtual |
Called when a complete ledger is obtained.
Implements xrpl::InboundLedgers.
Definition at line 292 of file InboundLedgers.cpp.
|
overridevirtual |
Implements xrpl::InboundLedgers.
Definition at line 299 of file InboundLedgers.cpp.
|
overridevirtual |
Implements xrpl::InboundLedgers.
Definition at line 345 of file InboundLedgers.cpp.
|
overridevirtual |
Implements xrpl::InboundLedgers.
Definition at line 369 of file InboundLedgers.cpp.
|
overridevirtual |
Implements xrpl::InboundLedgers.
Definition at line 417 of file InboundLedgers.cpp.
|
overridevirtual |
Implements xrpl::InboundLedgers.
Definition at line 426 of file InboundLedgers.cpp.
|
pure virtualinherited |
Implemented in xrpl::test::MagicInboundLedgers.
|
private |
Definition at line 48 of file InboundLedgers.cpp.
|
private |
Definition at line 49 of file InboundLedgers.cpp.
|
private |
Definition at line 51 of file InboundLedgers.cpp.
|
private |
Definition at line 52 of file InboundLedgers.cpp.
|
staticconstexpr |
Definition at line 56 of file InboundLedgers.cpp.
|
private |
Definition at line 433 of file InboundLedgers.cpp.
|
private |
Definition at line 436 of file InboundLedgers.cpp.
|
private |
Definition at line 438 of file InboundLedgers.cpp.
|
private |
Definition at line 440 of file InboundLedgers.cpp.
|
private |
Definition at line 442 of file InboundLedgers.cpp.
|
private |
Definition at line 444 of file InboundLedgers.cpp.
|
private |
Definition at line 446 of file InboundLedgers.cpp.
Definition at line 448 of file InboundLedgers.cpp.
|
private |
Definition at line 449 of file InboundLedgers.cpp.