[#Chainstate-TryAddBlockIndexCandidate]
= xref:Chainstate.adoc[Chainstate]::TryAddBlockIndexCandidate
:relfileprefix: ../
:mrdocs:

Add a block to the candidate set if it has as much work as the current tip&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;requires&lowbar;capability(0x7f2e1ba84c68), requires&lowbar;capability(0x7f2e145648b8), requires&lowbar;capability(0x7f2e373bda68), requires&lowbar;capability(0x7f2e36e346b8)&rsqb;&rsqb;
void
TryAddBlockIndexCandidate(xref:CBlockIndex.adoc[CBlockIndex]* pindex);
----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *pindex*
| Block index entry to consider as a candidate&period;
|===


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