[#HasValidProofOfWork]
= HasValidProofOfWork
:mrdocs:

Check that the proof of work on each blockheader matches the value in nBits&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
HasValidProofOfWork(
    std::span&lt;CBlockHeader const&gt; headers,
    xref:Consensus/Params.adoc[Consensus::Params] const& consensusParams);
----

== Return Value

true if every header has valid proof of work&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *headers*
| The block headers to check&period;
| *consensusParams*
| Consensus parameters defining the proof&hyphen;of&hyphen;work rules&period;
|===


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