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

Function BIP341_sha_prevouts

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

Source from the content-addressed store, hash-verified

800 self.assertEqual(multisig_script.GetSigOpCount(fAccurate=True), n)
801
802def BIP341_sha_prevouts(txTo):
803 return sha256(b"".join(i.prevout.serialize() for i in txTo.vin))
804
805def BIP341_sha_amounts(spent_utxos):
806 return sha256(b"".join(u.nValue.to_bytes(8, "little", signed=True) for u in spent_utxos))

Callers 2

gen_test_vectorsMethod · 0.90
TaprootSignatureMsgFunction · 0.85

Calls 3

sha256Function · 0.85
joinMethod · 0.80
serializeMethod · 0.45

Tested by

no test coverage detected