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

Function BIP341_sha_outputs

test/functional/test_framework/script.py:928–929  ·  view source on GitHub ↗
(txTo)

Source from the content-addressed store, hash-verified

926 return sha256(b"".join(struct.pack("<I", i.nSequence) for i in txTo.vin))
927
928def BIP341_sha_outputs(txTo):
929 return sha256(b"".join(o.serialize() for o in txTo.vout))
930
931def TaprootSignatureMsg(txTo, spent_utxos, hash_type, genesis_hash, input_index = 0, scriptpath = False, script = CScript(), codeseparator_pos = -1, annex = None, leaf_ver = LEAF_VERSION_TAPSCRIPT):
932 assert (len(txTo.vin) == len(spent_utxos))

Callers 2

gen_test_vectorsMethod · 0.90
TaprootSignatureMsgFunction · 0.85

Calls 3

sha256Function · 0.70
joinMethod · 0.45
serializeMethod · 0.45

Tested by

no test coverage detected