diff options
author | MacroFake <falke.marco@gmail.com> | 2022-08-01 11:58:54 +0200 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-08-01 11:58:57 +0200 |
commit | 2bca32b7c329e4c9997681cb6f456a3eee8491f0 (patch) | |
tree | 40f059044c55df5a040e66116518d1889878b7fd /test/functional/feature_taproot.py | |
parent | eeb5a94e275fdf02a4af5a9284bcf2515c54aa1f (diff) | |
parent | 395767e9f15b7a1b5203da68f1fbe3df281ae906 (diff) |
Merge bitcoin/bitcoin#24799: Add test case mimicking issue 24765
395767e9f15b7a1b5203da68f1fbe3df281ae906 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
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 777f873f70..67cdc5ca32 100755 --- a/test/functional/feature_taproot.py +++ b/test/functional/feature_taproot.py @@ -1131,6 +1131,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. |