[#ChainstateManager-ProcessNewBlockHeaders]
= xref:ChainstateManager.adoc[ChainstateManager]::ProcessNewBlockHeaders
:relfileprefix: ../
:mrdocs:

Process incoming block headers&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;locks&lowbar;excluded(0x7f2e1bc17988), locks&lowbar;excluded(0x7f2e146b5cd8), locks&lowbar;excluded(0x7f2e298fb0a8), locks&lowbar;excluded(0x7f2e360b8808)&rsqb;&rsqb;
bool
ProcessNewBlockHeaders(
    std::span&lt;CBlockHeader const&gt; headers,
    bool min&lowbar;pow&lowbar;checked,
    xref:BlockValidationState.adoc[BlockValidationState]& state,
    xref:CBlockIndex.adoc[CBlockIndex] const** ppindex = nullptr);
----

== Description

May not be called in a validationinterface callback&period;

== Return Value

false if AcceptBlockHeader fails on any of the headers, true otherwise (including if headers were already known)

== Parameters

[cols="1,4"]
|===
| Name| Description
| *headers* [in]
| The block headers themselves
| *min&lowbar;pow&lowbar;checked* [in]
| True if proof&hyphen;of&hyphen;work anti&hyphen;DoS checks have been done by caller for headers chain
| *state* [out]
| This may be set to an Error state if any error occurred processing them
| *ppindex* [out]
| If set, the pointer will be set to point to the last new block index object for the given headers
|===


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