mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-16 17:48:59 +02:00
Merge bitcoin/bitcoin#32301: test: cover invalid codesep positions for signature in taproot
81e5c8385btest: cover invalid codesep positions for signature in taproot (Greg Sanders) Pull request description: There is some basic coverage, but I felt like adding some boundary conditions where the only issue is the codesep value would be nice. ACKs for top commit: ajtowns: ACK81e5c8385bTheCharlatan: ACK81e5c8385bTree-SHA512: de74895c3bb49854987654720ebcefea2f47c4a55ba6ab4a52878f6a9a0bd8b3085afa3485101610327fa8d35c3d074542f58540e126460bd4bea918cb0054ee
This commit is contained in:
@@ -847,7 +847,7 @@ def TaprootSignatureMsg(txTo, spent_utxos, hash_type, input_index=0, *, scriptpa
|
||||
if scriptpath:
|
||||
ss += TaggedHash("TapLeaf", bytes([leaf_ver]) + ser_string(leaf_script))
|
||||
ss += bytes([0])
|
||||
ss += codeseparator_pos.to_bytes(4, "little", signed=True)
|
||||
ss += codeseparator_pos.to_bytes(4, "little", signed=False)
|
||||
assert len(ss) == 175 - (in_type == SIGHASH_ANYONECANPAY) * 49 - (out_type != SIGHASH_ALL and out_type != SIGHASH_SINGLE) * 32 + (annex is not None) * 32 + scriptpath * 37
|
||||
return ss
|
||||
|
||||
|
||||
Reference in New Issue
Block a user