Skip to content

Commit 395767e

Browse files
committed
Add test case mimicking issue 24765
1 parent 38d3d0b commit 395767e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/functional/feature_taproot.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,6 +1143,12 @@ def predict_sigops_ratio(n, dummy_size):
11431143
tap = taproot_construct(pubs[0], scripts)
11441144
add_spender(spenders, "alwaysvalid/notsuccessx", tap=tap, leaf="op_success", inputs=[], standard=False, failure={"leaf": "normal"}) # err_msg differs based on opcode
11451145

1146+
# == Test case for https://github.com/bitcoin/bitcoin/issues/24765 ==
1147+
1148+
zero_fn = lambda h: bytes([0 for _ in range(32)])
1149+
tap = taproot_construct(pubs[0], [("leaf", CScript([pubs[1], OP_CHECKSIG, pubs[1], OP_CHECKSIGADD, OP_2, OP_EQUAL])), zero_fn])
1150+
add_spender(spenders, "case24765", tap=tap, leaf="leaf", inputs=[getter("sign"), getter("sign")], key=secs[1], no_fail=True)
1151+
11461152
# == Legacy tests ==
11471153

11481154
# Also add a few legacy spends into the mix, so that transactions which combine taproot and pre-taproot spends get tested too.

0 commit comments

Comments
 (0)