| 117 | } |
| 118 | |
| 119 | static std::vector<uint256> BlockMerkleBranch(const CBlock& block, uint32_t position) |
| 120 | { |
| 121 | std::vector<uint256> leaves; |
| 122 | leaves.resize(block.vtx.size()); |
| 123 | for (size_t s = 0; s < block.vtx.size(); s++) { |
| 124 | leaves[s] = block.vtx[s]->GetHash(); |
| 125 | } |
| 126 | return ComputeMerkleBranch(leaves, position); |
| 127 | } |
| 128 | |
| 129 | // Older version of the merkle root computation code, for comparison. |
| 130 | static uint256 BlockBuildMerkleTree(const CBlock& block, bool* fMutated, std::vector<uint256>& vMerkleTree) |
no test coverage detected