[#HeadersSyncState-2constructor]
= xref:HeadersSyncState.adoc[HeadersSyncState]::HeadersSyncState
:relfileprefix: ../
:mrdocs:

Construct a HeadersSyncState object representing a headers sync via this download&hyphen;twice mechanism)&period;

== Synopsis

Declared in `&lt;headerssync&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
HeadersSyncState(
    xref:NodeId-08.adoc[NodeId] id,
    xref:Consensus/Params.adoc[Consensus::Params] const& consensus&lowbar;params,
    xref:HeadersSyncParams.adoc[HeadersSyncParams] const& params,
    xref:CBlockIndex.adoc[CBlockIndex] const& chain&lowbar;start,
    xref:arith_uint256.adoc[arith&lowbar;uint256] const& minimum&lowbar;required&lowbar;work);
----

== Description

id&colon; node id (for logging) consensus&lowbar;params&colon; parameters needed for difficulty adjustment validation chain&lowbar;start&colon; best known fork point that the peer&apos;s headers branch from minimum&lowbar;required&lowbar;work&colon; amount of chain work required to accept the chain

== Parameters

[cols="1,4"]
|===
| Name| Description
| *id*
| Node id, used for logging&period;
| *consensus&lowbar;params*
| Parameters needed for difficulty adjustment validation&period;
| *params*
| Tuning parameters for the headers sync buffers&period;
| *chain&lowbar;start*
| Best known fork point that the peer&apos;s headers branch from&period;
| *minimum&lowbar;required&lowbar;work*
| Chain work required before accepting the chain&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
