mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-13 03:30:42 +02:00
Merge bitcoin/bitcoin#24799: Add test case mimicking issue 24765
395767e9f1
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
This commit is contained in:
commit
2bca32b7c3
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user