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

helper function to efficiently calculate the number of nodes at given height in the merkle tree

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
unsigned int
CalcTreeWidth(int height) const;
----

== Return Value

The number of nodes present at that height&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *height*
| The tree level, counted from the leaf level (height 0) upward&period;
|===


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