test: cover invalid codesep positions for signature in taproot
This commit is contained in:
1 parent
9b1a7c3e8d
commit
81e5c8385b
2 files changed
+5
-3
No files matched your search
@@ -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