mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-31 08:13:52 +02:00
merkle: remove unused mutated arg from BlockWitnessMerkleRoot
The `mutated` parameter is never used at any call site - all callers pass `nullptr`. The explicit comment in `validation.cpp` explains the reason: // The malleation check is ignored; as the transaction tree itself // already does not permit it, it is impossible to trigger in the // witness tree.
This commit is contained in:
@@ -73,7 +73,7 @@ uint256 BlockMerkleRoot(const CBlock& block, bool* mutated)
|
||||
return ComputeMerkleRoot(std::move(leaves), mutated);
|
||||
}
|
||||
|
||||
uint256 BlockWitnessMerkleRoot(const CBlock& block, bool* mutated)
|
||||
uint256 BlockWitnessMerkleRoot(const CBlock& block)
|
||||
{
|
||||
std::vector<uint256> leaves;
|
||||
leaves.resize(block.vtx.size());
|
||||
@@ -81,7 +81,7 @@ uint256 BlockWitnessMerkleRoot(const CBlock& block, bool* mutated)
|
||||
for (size_t s = 1; s < block.vtx.size(); s++) {
|
||||
leaves[s] = block.vtx[s]->GetWitnessHash().ToUint256();
|
||||
}
|
||||
return ComputeMerkleRoot(std::move(leaves), mutated);
|
||||
return ComputeMerkleRoot(std::move(leaves));
|
||||
}
|
||||
|
||||
/* This implements a constant-space merkle path calculator, limited to 2^32 leaves. */
|
||||
|
||||
Reference in New Issue
Block a user