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

recursive function that traverses tree nodes, storing the data as bits and hashes

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
TraverseAndBuild(
    int height,
    unsigned int pos,
    std::vector&lt;Txid&gt; const& vTxid,
    std::vector&lt;bool&gt; const& vMatch);
----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *height*
| The tree level of the current node, counted from the leaf level (height 0) upward&period;
| *pos*
| The position of the current node within its level&period;
| *vTxid*
| The full list of transaction ids for the block&period;
| *vMatch*
| The per&hyphen;transaction mask selecting which txids are included in the proof&period;
|===


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