diff options
author | Pieter Wuille <pieter@wuille.net> | 2022-04-06 18:11:27 -0400 |
---|---|---|
committer | Pieter Wuille <pieter@wuille.net> | 2022-04-07 11:40:58 -0400 |
commit | 395767e9f15b7a1b5203da68f1fbe3df281ae906 (patch) | |
tree | f05db858781c721aace59c7d197646e844d8ead1 /test/functional/feature_taproot.py | |
parent | 38d3d0bfc4cae6b31c5ac30f9b0da458bd9a9e57 (diff) |
Add test case mimicking issue 24765
Diffstat (limited to 'test/functional/feature_taproot.py')
-rwxr-xr-x | test/functional/feature_taproot.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/functional/feature_taproot.py b/test/functional/feature_taproot.py index c3925dbb00..daa7ac1221 100755 --- a/test/functional/feature_taproot.py +++ b/test/functional/feature_taproot.py @@ -1143,6 +1143,12 @@ def spenders_taproot_active(): tap = taproot_construct(pubs[0], scripts) add_spender(spenders, "alwaysvalid/notsuccessx", tap=tap, leaf="op_success", inputs=[], standard=False, failure={"leaf": "normal"}) # err_msg differs based on opcode + # == Test case for https://github.com/bitcoin/bitcoin/issues/24765 == + + zero_fn = lambda h: bytes([0 for _ in range(32)]) + tap = taproot_construct(pubs[0], [("leaf", CScript([pubs[1], OP_CHECKSIG, pubs[1], OP_CHECKSIGADD, OP_2, OP_EQUAL])), zero_fn]) + add_spender(spenders, "case24765", tap=tap, leaf="leaf", inputs=[getter("sign"), getter("sign")], key=secs[1], no_fail=True) + # == Legacy tests == # Also add a few legacy spends into the mix, so that transactions which combine taproot and pre-taproot spends get tested too. |