Ok this is consensus code so I'm prepared to see this rejected, but I figure I'd bring it up just in case:
- Don't publish
ComputeMerkleRootdeclaration in consensus/merkle.h, it's only used in the bench. - Don't continue checking for mutations in
ComputeMerkleRootif one has already been found. - Compare
mutatedtonullptrto clarify that it's a pointer rather than a bool.
I saw a ~3% MerkleRoot bench improvement due either to random chance or the dropped mutation checks.