46 while (
hashes.size() > 1) {
48 for (
size_t pos = 0; pos + 1 <
hashes.size(); pos += 2) {
70 std::vector<uint256>
leaves;
72 for (
size_t s = 0; s < block.
vtx.size(); s++) {
std::vector< CTransactionRef > vtx
uint256 ComputeMerkleRoot(std::vector< uint256 > hashes, bool *mutated)
uint256 BlockMerkleRoot(const CBlock &block, bool *mutated)
Compute the Merkle root of the transactions in a block.
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
void SHA256D64(uint8_t *out, const uint8_t *in, size_t blocks)
Compute multiple double-SHA256's of 64-byte blobs.