Skip to content

Commit 2bca32b

Browse files
author
MacroFake
committed
Merge bitcoin/bitcoin#24799: Add test case mimicking issue 24765
395767e Add test case mimicking issue 24765 (Pieter Wuille) Pull request description: This adds a functional test for the concern brought up in #24765. It turned out to be a non-issue, but since I wrote it anyway, it can't hurt to add it. Top commit has no ACKs. Tree-SHA512: fc8d57129d8c68f6d9a41b94b5ff676c87b31f53bc958195d4fe312530ec3e038ebd0bc5e8b9d56be77b7b63fd94574685901901404a4ab8726a5e09d89e86c8
2 parents eeb5a94 + 395767e commit 2bca32b

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
@@ -1131,6 +1131,12 @@ def predict_sigops_ratio(n, dummy_size):
11311131
tap = taproot_construct(pubs[0], scripts)
11321132
add_spender(spenders, "alwaysvalid/notsuccessx", tap=tap, leaf="op_success", inputs=[], standard=False, failure={"leaf": "normal"}) # err_msg differs based on opcode
11331133

1134+
# == Test case for https://github.com/bitcoin/bitcoin/issues/24765 ==
1135+
1136+
zero_fn = lambda h: bytes([0 for _ in range(32)])
1137+
tap = taproot_construct(pubs[0], [("leaf", CScript([pubs[1], OP_CHECKSIG, pubs[1], OP_CHECKSIGADD, OP_2, OP_EQUAL])), zero_fn])
1138+
add_spender(spenders, "case24765", tap=tap, leaf="leaf", inputs=[getter("sign"), getter("sign")], key=secs[1], no_fail=True)
1139+
11341140
# == Legacy tests ==
11351141

11361142
# 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)