3#include <xrpld/app/ledger/InboundLedger.h>
4#include <xrpld/app/ledger/detail/TimeoutCounter.h>
5#include <xrpld/app/main/Application.h>
47 uint256 const& finishLedgerHash,
Manages the lifetime of inbound ledgers.
Manage the retrieval of a ledger delta (header and transactions) from the network.
InboundLedger::Reason reason
std::uint32_t totalLedgers
TaskParameter(InboundLedger::Reason r, uint256 const &finishLedgerHash, std::uint32_t totalNumLedgers)
constructor
std::vector< uint256 > skipList
bool update(uint256 const &hash, std::uint32_t seq, std::vector< uint256 > const &sList)
fill all the fields that was not filled during construction
bool canMergeInto(TaskParameter const &existingTask) const
check if this task can be merged into an existing task
void trigger(ScopedLockType &sl)
Trigger another round.
void onTimer(bool progress, ScopedLockType &sl) override
Hook called from invokeOnTimer().
LedgerReplayer & replayer_
~LedgerReplayTask() override
LedgerReplayTask(Application &app, InboundLedgers &inboundLedgers, LedgerReplayer &replayer, std::shared_ptr< SkipListAcquire > &skipListAcquirer, TaskParameter const ¶meter)
Constructor.
InboundLedgers & inboundLedgers_
void updateSkipList(uint256 const &hash, std::uint32_t seq, std::vector< uint256 > const &sList)
Update this task (by a SkipListAcquire subtask) when skip list is ready.
void tryAdvance(ScopedLockType &sl)
Try to build more ledgers.
void deltaReady(uint256 const &deltaHash)
Notify this task (by a LedgerDeltaAcquire subtask) that a delta is ready.
std::weak_ptr< TimeoutCounter > pmDowncast() override
Return a weak pointer to this.
TaskParameter const & getTaskParameter() const
std::vector< std::shared_ptr< LedgerDeltaAcquire > > deltas_
bool finished() const
return if the task is finished
void addDelta(std::shared_ptr< LedgerDeltaAcquire > const &delta)
add a new LedgerDeltaAcquire subtask
std::shared_ptr< Ledger const > parent_
std::shared_ptr< SkipListAcquire > skipListAcquirer_
void init()
Start the task.
Manages the lifetime of ledger replay tasks.
Manage the retrieval of a skip list in a ledger from the network.
TimeoutCounter(Application &app, uint256 const &targetHash, std::chrono::milliseconds timeoutInterval, QueueJobParameter &&jobParameter, beast::Journal journal)
std::unique_lock< std::recursive_mutex > ScopedLockType
Ledger replay client side.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.