[#GetNextWorkRequired]
= GetNextWorkRequired
:mrdocs:

Compute the proof&hyphen;of&hyphen;work target (nBits) required for the block following pindexLast&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
unsigned int
GetNextWorkRequired(
    xref:CBlockIndex.adoc[CBlockIndex] const* pindexLast,
    xref:CBlockHeader.adoc[CBlockHeader] const* pblock,
    xref:Consensus/Params.adoc[Consensus::Params] const& params);
----

== Return Value

The required target in compact nBits form&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *pindexLast*
| The last block before the one whose target is being computed&period;
| *pblock*
| The candidate block header being connected&period;
| *params*
| The consensus parameters for the active chain&period;
|===


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