rippled
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
ripple::LedgerReplayTask::TaskParameter Class Reference

#include <LedgerReplayTask.h>

Collaboration diagram for ripple::LedgerReplayTask::TaskParameter:
Collaboration graph
[legend]

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 26 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 9 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 22 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 43 of file LedgerReplayTask.cpp.

Member Data Documentation

◆ reason_

InboundLedger::Reason ripple::LedgerReplayTask::TaskParameter::reason_

Definition at line 30 of file LedgerReplayTask.h.

◆ finishHash_

uint256 ripple::LedgerReplayTask::TaskParameter::finishHash_

Definition at line 31 of file LedgerReplayTask.h.

◆ totalLedgers_

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

Definition at line 32 of file LedgerReplayTask.h.

◆ finishSeq_

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

Definition at line 35 of file LedgerReplayTask.h.

◆ skipList_

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

Definition at line 36 of file LedgerReplayTask.h.

◆ startHash_

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

Definition at line 37 of file LedgerReplayTask.h.

◆ startSeq_

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

Definition at line 38 of file LedgerReplayTask.h.

◆ full_

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

Definition at line 39 of file LedgerReplayTask.h.