[#CPartialMerkleTree-ExtractMatches]
= xref:CPartialMerkleTree.adoc[CPartialMerkleTree]::ExtractMatches
:relfileprefix: ../
:mrdocs:

extract the matching txid&apos;s represented by this partial merkle tree and their respective indices within the partial tree&period; returns the merkle root, or 0 in case of failure

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:uint256.adoc[uint256]
ExtractMatches(
    std::vector&lt;Txid&gt;& vMatch,
    std::vector&lt;unsigned int&gt;& vnIndex);
----

== Return Value

The merkle root, or 0 in case of failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *vMatch*
| Output list of matched transaction ids&period;
| *vnIndex*
| Output list of the indices of the matched transactions within the tree&period;
|===


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