aboutsummaryrefslogtreecommitdiff
path: root/src/merkleblock.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/merkleblock.h')
-rw-r--r--src/merkleblock.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/merkleblock.h b/src/merkleblock.h
index de4c5c8d29..20f2b36886 100644
--- a/src/merkleblock.h
+++ b/src/merkleblock.h
@@ -63,7 +63,7 @@ protected:
bool fBad;
/** helper function to efficiently calculate the number of nodes at given height in the merkle tree */
- unsigned int CalcTreeWidth(int height) {
+ unsigned int CalcTreeWidth(int height) const {
return (nTransactions+(1 << height)-1) >> height;
}
@@ -121,6 +121,8 @@ public:
/**
* Used to relay blocks as header + vector<merkle branch>
* to filtered nodes.
+ *
+ * NOTE: The class assumes that the given CBlock has *at least* 1 transaction. If the CBlock has 0 txs, it will hit an assertion.
*/
class CMerkleBlock
{