From 395767e9f15b7a1b5203da68f1fbe3df281ae906 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Wed, 6 Apr 2022 18:11:27 -0400 Subject: Add test case mimicking issue 24765 --- test/functional/feature_taproot.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/functional/feature_taproot.py') 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. -- cgit v1.2.3