diff --git a/src/primitives/block.cpp b/src/primitives/block.cpp index a40f46457..193155ebf 100644 --- a/src/primitives/block.cpp +++ b/src/primitives/block.cpp @@ -112,6 +112,8 @@ uint256 CBlock::CheckMerkleBranch(uint256 hash, const std::vector& vMer return hash; } +// Return 0 if x == 0, otherwise the smallest power of 2 greater than or equal to x. +// Algorithm based on . static uint64_t next_pow2(uint64_t x) { x -= 1;