MCPcopy Create free account
hub / github.com/ElementsProject/elements / BlockMerkleRoot

Function BlockMerkleRoot

src/consensus/merkle.cpp:65–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63
64
65uint256 BlockMerkleRoot(const CBlock& block, bool* mutated)
66{
67 std::vector<uint256> leaves;
68 leaves.resize(block.vtx.size());
69 for (size_t s = 0; s < block.vtx.size(); s++) {
70 leaves[s] = block.vtx[s]->GetHash();
71 }
72 return ComputeMerkleRoot(std::move(leaves), mutated);
73}
74
75uint256 BlockWitnessMerkleRoot(const CBlock& block, bool* mutated)
76{

Callers 15

CheckBlockFunction · 0.85
CreateGenesisBlockFunction · 0.85
AppendInitialIssuanceFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
BuildBlockTestCaseFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
FinalizeBlockMethod · 0.85
deserialize.cppFile · 0.85
FUZZ_TARGET_INITFunction · 0.85
CreateBlockChainFunction · 0.85

Calls 4

ComputeMerkleRootFunction · 0.85
resizeMethod · 0.45
sizeMethod · 0.45
GetHashMethod · 0.45

Tested by 9

BOOST_AUTO_TEST_CASEFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68
BuildBlockTestCaseFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68
FinalizeBlockMethod · 0.68
FUZZ_TARGET_INITFunction · 0.68
CreateBlockChainFunction · 0.68
PrepareBlockFunction · 0.68