HeadersSyncState::HeadersSyncState

Construct a HeadersSyncState object representing a headers sync via this download-twice mechanism).

Synopsis

Declared in <headerssync.h>

HeadersSyncState(
    NodeId id,
    Consensus::Params const& consensus_params,
    HeadersSyncParams const& params,
    CBlockIndex const& chain_start,
    arith_uint256 const& minimum_required_work);

Description

id: node id (for logging) consensus_params: parameters needed for difficulty adjustment validation chain_start: best known fork point that the peer's headers branch from minimum_required_work: amount of chain work required to accept the chain

Parameters

NameDescription
idNode id, used for logging.
consensus_paramsParameters needed for difficulty adjustment validation.
paramsTuning parameters for the headers sync buffers.
chain_startBest known fork point that the peer's headers branch from.
minimum_required_workChain work required before accepting the chain.