|
| void | filterNodes (std::vector< std::pair< SHAMapNodeID, uint256 >> &nodes, TriggerReason reason) |
| |
| void | trigger (std::shared_ptr< Peer > const &, TriggerReason) |
| | Request more nodes, perhaps from a specific peer. More...
|
| |
| std::vector< neededHash_t > | getNeededHashes () |
| |
| void | addPeers () |
| | Add more peers to the set, if possible. More...
|
| |
| void | tryDB (NodeStore::Database &srcDB) |
| |
| void | done () |
| |
| void | onTimer (bool progress, ScopedLockType &peerSetLock) override |
| | Called with a lock by the PeerSet when the timer expires. More...
|
| |
| std::size_t | getPeerCount () const |
| |
| std::weak_ptr< TimeoutCounter > | pmDowncast () override |
| | Return a weak pointer to this. More...
|
| |
| int | processData (std::shared_ptr< Peer > peer, protocol::TMLedgerData &data) |
| | Process one TMLedgerData Returns the number of useful nodes. More...
|
| |
| bool | takeHeader (std::string const &data) |
| | Take ledger header data Call with a lock. More...
|
| |
| void | receiveNode (protocol::TMLedgerData &packet, SHAMapAddNode &) |
| | Process node data received from a peer Call with a lock. More...
|
| |
| bool | takeTxRootNode (Slice const &data, SHAMapAddNode &) |
| | Process AS root node received from a peer Call with a lock. More...
|
| |
| bool | takeAsRootNode (Slice const &data, SHAMapAddNode &) |
| | Process AS root node received from a peer Call with a lock. More...
|
| |
| std::vector< uint256 > | neededTxHashes (int max, SHAMapSyncFilter *filter) const |
| |
| std::vector< uint256 > | neededStateHashes (int max, SHAMapSyncFilter *filter) const |
| |
| void | invokeOnTimer () |
| | Calls onTimer() if in the right state. More...
|
| |
Definition at line 35 of file InboundLedger.h.
◆ clock_type
◆ neededHash_t
◆ ScopedLockType
◆ Reason
| Enumerator |
|---|
| HISTORY | |
| SHARD | |
| GENERIC | |
| CONSENSUS | |
Definition at line 43 of file InboundLedger.h.
◆ TriggerReason
◆ InboundLedger()
◆ ~InboundLedger()
| ripple::InboundLedger::~InboundLedger |
( |
| ) |
|
◆ update()
◆ isComplete()
| bool ripple::InboundLedger::isComplete |
( |
| ) |
const |
◆ isFailed()
| bool ripple::InboundLedger::isFailed |
( |
| ) |
const |
Returns false if we failed to get the data.
Definition at line 73 of file InboundLedger.h.
◆ getLedger()
◆ getSeq()
◆ checkLocal()
| bool ripple::InboundLedger::checkLocal |
( |
| ) |
|
◆ init()
◆ gotData()
Stash a TMLedgerData received from a peer for later processing Returns 'true' if we need to dispatch.
Definition at line 1105 of file InboundLedger.cpp.
◆ getJson()
◆ runData()
| void ripple::InboundLedger::runData |
( |
| ) |
|
Process pending TMLedgerData Query the a random sample of the 'best' peers.
Definition at line 1312 of file InboundLedger.cpp.
◆ touch()
| void ripple::InboundLedger::touch |
( |
| ) |
|
◆ getLastAction()
◆ filterNodes()
◆ trigger()
◆ getNeededHashes()
◆ addPeers()
| void ripple::InboundLedger::addPeers |
( |
| ) |
|
|
private |
◆ tryDB()
◆ done()
| void ripple::InboundLedger::done |
( |
| ) |
|
|
private |
◆ onTimer()
| void ripple::InboundLedger::onTimer |
( |
bool |
progress, |
|
|
ScopedLockType & |
peerSetLock |
|
) |
| |
|
overrideprivatevirtual |
◆ getPeerCount()
| std::size_t ripple::InboundLedger::getPeerCount |
( |
| ) |
const |
|
private |
◆ pmDowncast()
◆ processData()
| int ripple::InboundLedger::processData |
( |
std::shared_ptr< Peer > |
peer, |
|
|
protocol::TMLedgerData & |
data |
|
) |
| |
|
private |
Process one TMLedgerData Returns the number of useful nodes.
Definition at line 1132 of file InboundLedger.cpp.
◆ takeHeader()
| bool ripple::InboundLedger::takeHeader |
( |
std::string const & |
data | ) |
|
|
private |
◆ receiveNode()
| void ripple::InboundLedger::receiveNode |
( |
protocol::TMLedgerData & |
packet, |
|
|
SHAMapAddNode & |
san |
|
) |
| |
|
private |
Process node data received from a peer Call with a lock.
Definition at line 928 of file InboundLedger.cpp.
◆ takeTxRootNode()
Process AS root node received from a peer Call with a lock.
Definition at line 1043 of file InboundLedger.cpp.
◆ takeAsRootNode()
Process AS root node received from a peer Call with a lock.
Definition at line 1018 of file InboundLedger.cpp.
◆ neededTxHashes()
◆ neededStateHashes()
◆ cancel()
| void ripple::TimeoutCounter::cancel |
( |
| ) |
|
|
virtualinherited |
Cancel the task by marking it as failed if the task is not done.
- Note
- this function does not attempt to cancel the scheduled timer or to remove the queued job if any. When the timer expires or the queued job starts, however, the code will see that the task is done and returns immediately, if it can lock the weak pointer of the task.
Definition at line 118 of file TimeoutCounter.cpp.
◆ setTimer()
◆ queueJob()
◆ isDone()
| bool ripple::TimeoutCounter::isDone |
( |
| ) |
const |
|
protectedinherited |
◆ invokeOnTimer()
| void ripple::TimeoutCounter::invokeOnTimer |
( |
| ) |
|
|
privateinherited |
◆ getCounter()
|
|
staticprivatenoexceptinherited |
◆ m_clock
◆ mLastAction
◆ mLedger
◆ mHaveHeader
| bool ripple::InboundLedger::mHaveHeader |
|
private |
◆ mHaveState
| bool ripple::InboundLedger::mHaveState |
|
private |
◆ mHaveTransactions
| bool ripple::InboundLedger::mHaveTransactions |
|
private |
◆ mSignaled
| bool ripple::InboundLedger::mSignaled |
|
private |
◆ mByHash
| bool ripple::InboundLedger::mByHash |
|
private |
◆ mSeq
◆ mReason
| const Reason ripple::InboundLedger::mReason |
|
private |
◆ mRecentNodes
◆ mStats
◆ mReceivedDataLock
| std::mutex ripple::InboundLedger::mReceivedDataLock |
|
private |
◆ mReceivedData
◆ mReceiveDispatched
| bool ripple::InboundLedger::mReceiveDispatched |
|
private |
◆ mPeerSet
◆ app_
◆ journal_
◆ mtx_
|
|
mutableprotectedinherited |
◆ hash_
| const uint256 ripple::TimeoutCounter::hash_ |
|
protectedinherited |
The hash of the object (in practice, always a ledger) we are trying to fetch.
Definition at line 129 of file TimeoutCounter.h.
◆ timeouts_
| int ripple::TimeoutCounter::timeouts_ |
|
protectedinherited |
◆ complete_
| bool ripple::TimeoutCounter::complete_ |
|
protectedinherited |
◆ failed_
| bool ripple::TimeoutCounter::failed_ |
|
protectedinherited |
◆ progress_
| bool ripple::TimeoutCounter::progress_ |
|
protectedinherited |
◆ timerInterval_
The minimum time to wait between calls to execute().
Definition at line 136 of file TimeoutCounter.h.
◆ queueJobParameter_
◆ timer_