[#AbstractThresholdConditionChecker-GetStateFor]
= xref:AbstractThresholdConditionChecker.adoc[AbstractThresholdConditionChecker]::GetStateFor
:relfileprefix: ../
:mrdocs:

Returns the state for pindex A based on parent pindexPrev B&period; Applies any state transition if conditions are present&period; Caches state from first block of period&period;

== Synopsis

Declared in `&lt;versionbits&lowbar;impl&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:ThresholdState.adoc[ThresholdState]
GetStateFor(
    xref:CBlockIndex.adoc[CBlockIndex] const* pindexPrev,
    xref:ThresholdConditionCache.adoc[ThresholdConditionCache]& cache) const;
----

== Return Value

The threshold state for the block following pindexPrev&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *pindexPrev*
| The parent block from which to compute the state&period;
| *cache*
| The cache of previously computed states, updated by this call&period;
|===


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