rippled
Public Member Functions | Public Attributes | List of all members
ripple::LedgerReplayTask::TaskParameter Class Reference
Collaboration diagram for ripple::LedgerReplayTask::TaskParameter:
Collaboration graph
[legend]

Public Member Functions

 TaskParameter (InboundLedger::Reason r, uint256 const &finishLedgerHash, std::uint32_t totalNumLedgers)
 constructor More...
 
bool update (uint256 const &hash, std::uint32_t seq, std::vector< uint256 > const &sList)
 fill all the fields that was not filled during construction More...
 
bool canMergeInto (TaskParameter const &existingTask) const
 check if this task can be merged into an existing task More...
 

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 46 of file LedgerReplayTask.h.

Constructor & Destructor Documentation

◆ TaskParameter()

ripple::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 29 of file LedgerReplayTask.cpp.

Member Function Documentation

◆ update()

bool ripple::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 39 of file LedgerReplayTask.cpp.

◆ canMergeInto()

bool ripple::LedgerReplayTask::TaskParameter::canMergeInto ( TaskParameter const &  existingTask) const

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 ripple::LedgerReplayTask::TaskParameter::reason_

Definition at line 50 of file LedgerReplayTask.h.

◆ finishHash_

uint256 ripple::LedgerReplayTask::TaskParameter::finishHash_

Definition at line 51 of file LedgerReplayTask.h.

◆ totalLedgers_

std::uint32_t ripple::LedgerReplayTask::TaskParameter::totalLedgers_

Definition at line 52 of file LedgerReplayTask.h.

◆ finishSeq_

std::uint32_t ripple::LedgerReplayTask::TaskParameter::finishSeq_ = 0

Definition at line 55 of file LedgerReplayTask.h.

◆ skipList_

std::vector<uint256> ripple::LedgerReplayTask::TaskParameter::skipList_ = {}

Definition at line 56 of file LedgerReplayTask.h.

◆ startHash_

uint256 ripple::LedgerReplayTask::TaskParameter::startHash_ = {}

Definition at line 57 of file LedgerReplayTask.h.

◆ startSeq_

std::uint32_t ripple::LedgerReplayTask::TaskParameter::startSeq_ = 0

Definition at line 58 of file LedgerReplayTask.h.

◆ full_

bool ripple::LedgerReplayTask::TaskParameter::full_ = false

Definition at line 59 of file LedgerReplayTask.h.