|
65 | 65 | OP_EQUAL, |
66 | 66 | OP_EQUALVERIFY, |
67 | 67 | OP_IF, |
| 68 | + OP_INTERNALKEY, |
68 | 69 | OP_NOP, |
69 | 70 | OP_NOT, |
70 | 71 | OP_NOTIF, |
@@ -660,6 +661,22 @@ def byte_popper(expr): |
660 | 661 |
|
661 | 662 | # === Actual test cases === |
662 | 663 |
|
| 664 | +def spenders_internalkey_active(): |
| 665 | + |
| 666 | + secs = [generate_privkey() for _ in range(8)] |
| 667 | + pubs = [compute_xonly_pubkey(sec)[0] for sec in secs] |
| 668 | + |
| 669 | + spenders = [] |
| 670 | + |
| 671 | + scripts = [ |
| 672 | + ("ik", CScript([OP_INTERNALKEY, OP_EQUAL])), |
| 673 | + ] |
| 674 | + |
| 675 | + tap = taproot_construct(pubs[0], scripts) |
| 676 | + |
| 677 | + add_spender(spenders, "ik/success", tap=tap, leaf="ik", inputs=[pubs[0]], failure={"inputs": [pubs[1]]}) |
| 678 | + |
| 679 | + return spenders |
663 | 680 |
|
664 | 681 | def spenders_taproot_active(): |
665 | 682 | """Return a list of Spenders for testing post-Taproot activation behavior.""" |
@@ -1783,7 +1800,7 @@ def run_test(self): |
1783 | 1800 | self.gen_test_vectors() |
1784 | 1801 |
|
1785 | 1802 | self.log.info("Post-activation tests...") |
1786 | | - self.test_spenders(self.nodes[0], spenders_taproot_active(), input_counts=[1, 2, 2, 2, 2, 3]) |
| 1803 | + self.test_spenders(self.nodes[0], spenders_taproot_active() + spenders_internalkey_active(), input_counts=[1, 2, 2, 2, 2, 3]) |
1787 | 1804 | # Run each test twice; once in isolation, and once combined with others. Testing in isolation |
1788 | 1805 | # means that the standardness is verified in every test (as combined transactions are only standard |
1789 | 1806 | # when all their inputs are standard). |
|
0 commit comments