xrpld
Loading...
Searching...
No Matches
xrpl::LedgerReplayTask::TaskParameter Class Reference

#include <LedgerReplayTask.h>

Collaboration diagram for xrpl::LedgerReplayTask::TaskParameter:

Public Member Functions

 TaskParameter (InboundLedger::Reason r, uint256 const &finishLedgerHash, std::uint32_t totalNumLedgers)
 constructor
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

Public Attributes

InboundLedger::Reason reason
uint256 finishHash
std::uint32_t totalLedgers
std::uint32_t finishSeq = 0
std::vector< uint256skipList
uint256 startHash
std::uint32_t startSeq = 0
bool full = false

Detailed Description

Definition at line 24 of file LedgerReplayTask.h.

Constructor & Destructor Documentation

◆ TaskParameter()

xrpl::LedgerReplayTask::TaskParameter::TaskParameter ( InboundLedger::Reason r,
uint256 const & finishLedgerHash,
std::uint32_t totalNumLedgers )

constructor

Parameters
rthe reason of the task
finishLedgerHashhash of the last ledger in the range
totalNumLedgersnumber of ledgers to download

Definition at line 24 of file LedgerReplayTask.cpp.

Member Function Documentation

◆ update()

bool xrpl::LedgerReplayTask::TaskParameter::update ( uint256 const & hash,
std::uint32_t seq,
std::vector< uint256 > const & sList )

fill all the fields that was not filled during construction

Note
called with verified skip list data
Parameters
hashhash of the ledger that has the skip list
seqsequence number of the ledger that has the skip list
sListskip list
Returns
false if error (e.g. hash mismatch) true on success

Definition at line 37 of file LedgerReplayTask.cpp.

◆ canMergeInto()

bool xrpl::LedgerReplayTask::TaskParameter::canMergeInto ( TaskParameter const & existingTask) const
nodiscard

check if this task can be merged into an existing task

Definition at line 58 of file LedgerReplayTask.cpp.

Member Data Documentation

◆ reason

InboundLedger::Reason xrpl::LedgerReplayTask::TaskParameter::reason

Definition at line 28 of file LedgerReplayTask.h.

◆ finishHash

uint256 xrpl::LedgerReplayTask::TaskParameter::finishHash

Definition at line 29 of file LedgerReplayTask.h.

◆ totalLedgers

std::uint32_t xrpl::LedgerReplayTask::TaskParameter::totalLedgers

Definition at line 30 of file LedgerReplayTask.h.

◆ finishSeq

std::uint32_t xrpl::LedgerReplayTask::TaskParameter::finishSeq = 0

Definition at line 33 of file LedgerReplayTask.h.

◆ skipList

std::vector<uint256> xrpl::LedgerReplayTask::TaskParameter::skipList

Definition at line 34 of file LedgerReplayTask.h.

◆ startHash

uint256 xrpl::LedgerReplayTask::TaskParameter::startHash

Definition at line 35 of file LedgerReplayTask.h.

◆ startSeq

std::uint32_t xrpl::LedgerReplayTask::TaskParameter::startSeq = 0

Definition at line 36 of file LedgerReplayTask.h.

◆ full

bool xrpl::LedgerReplayTask::TaskParameter::full = false

Definition at line 37 of file LedgerReplayTask.h.