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

Function ComputeModifiedMerkleRoot

src/signet.cpp:57–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57static uint256 ComputeModifiedMerkleRoot(const CMutableTransaction& cb, const CBlock& block)
58{
59 std::vector<uint256> leaves;
60 leaves.resize(block.vtx.size());
61 leaves[0] = cb.GetHash();
62 for (size_t s = 1; s < block.vtx.size(); ++s) {
63 leaves[s] = block.vtx[s]->GetHash();
64 }
65 return ComputeMerkleRoot(std::move(leaves));
66}
67
68std::optional<SignetTxs> SignetTxs::Create(const CBlock& block, const CScript& challenge)
69{

Callers 1

CreateMethod · 0.85

Calls 4

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

Tested by

no test coverage detected