MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / ComputeTapleafHash

Function ComputeTapleafHash

src/script/interpreter.cpp:1882–1885  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1880}
1881
1882uint256 ComputeTapleafHash(uint8_t leaf_version, std::span<const unsigned char> script)
1883{
1884 return (HashWriter{HASHER_TAPLEAF} << leaf_version << CompactSizeWriter(script.size()) << script).GetSHA256();
1885}
1886
1887uint256 ComputeTapbranchHash(std::span<const unsigned char> a, std::span<const unsigned char> b)
1888{

Callers 5

InferTaprootTreeFunction · 0.85
VerifyWitnessProgramFunction · 0.85
SignTaprootScriptFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 3

CompactSizeWriterClass · 0.85
GetSHA256Method · 0.80
sizeMethod · 0.45

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.68