[#CalculateNextWorkRequired]
= CalculateNextWorkRequired
:mrdocs:

Compute the retargeted proof&hyphen;of&hyphen;work target after a difficulty adjustment interval&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
unsigned int
CalculateNextWorkRequired(
    xref:CBlockIndex.adoc[CBlockIndex] const* pindexLast,
    int64&lowbar;t nFirstBlockTime,
    xref:Consensus/Params.adoc[Consensus::Params] const& params);
----

== Return Value

The retargeted target in compact nBits form&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *pindexLast*
| The last block of the interval being retargeted&period;
| *nFirstBlockTime*
| The timestamp of the first block in the interval&period;
| *params*
| The consensus parameters for the active chain&period;
|===


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