[#GetWitnessCommitmentIndex]
= GetWitnessCommitmentIndex
:mrdocs:

Compute at which vout of the block&apos;s coinbase transaction the witness commitment occurs, or &hyphen;1 if not found

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
GetWitnessCommitmentIndex(xref:CBlock.adoc[CBlock] const& block);
----

== Return Value

The output index of the witness commitment, or NO&lowbar;WITNESS&lowbar;COMMITMENT (&hyphen;1) if none is present&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *block*
| The block whose coinbase outputs are scanned&period;
|===


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