20#ifndef RIPPLE_APP_LEDGER_LEDGERREPLAYTASK_H_INCLUDED
21#define RIPPLE_APP_LEDGER_LEDGERREPLAYTASK_H_INCLUDED
23#include <xrpld/app/ledger/InboundLedger.h>
24#include <xrpld/app/ledger/detail/TimeoutCounter.h>
25#include <xrpld/app/main/Application.h>
32class LedgerDeltaAcquire;
36class LedgerReplayClient;
68 uint256 const& finishLedgerHash,
Tracks the number of instances of an object.
Manages the lifetime of inbound ledgers.
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
std::vector< uint256 > skipList_
InboundLedger::Reason reason_
std::uint32_t totalLedgers_
void trigger(ScopedLockType &sl)
Trigger another round.
bool finished() const
return if the task is finished
std::vector< std::shared_ptr< LedgerDeltaAcquire > > deltas_
void addDelta(std::shared_ptr< LedgerDeltaAcquire > const &delta)
add a new LedgerDeltaAcquire subtask
void deltaReady(uint256 const &deltaHash)
Notify this task (by a LedgerDeltaAcquire subtask) that a delta is ready.
LedgerReplayer & replayer_
void init()
Start the task.
InboundLedgers & inboundLedgers_
std::shared_ptr< SkipListAcquire > skipListAcquirer_
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.
std::weak_ptr< TimeoutCounter > pmDowncast() override
Return a weak pointer to this.
TaskParameter const & getTaskParameter() const
void tryAdvance(ScopedLockType &sl)
Try to build more ledgers.
std::shared_ptr< Ledger const > parent_
void onTimer(bool progress, ScopedLockType &sl) override
Hook called from invokeOnTimer().
Manages the lifetime of ledger replay tasks.
This class is an "active" object.
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.