|
93 | 93 | ) |
94 | 94 | from test_framework.test_framework import BitcoinTestFramework |
95 | 95 | from test_framework.util import ( |
| 96 | + assert_not_equal, |
96 | 97 | assert_raises_rpc_error, |
97 | 98 | assert_equal, |
98 | 99 | ) |
@@ -1570,20 +1571,20 @@ def gen_test_vectors(self): |
1570 | 1571 | # Require negated taps[0] |
1571 | 1572 | assert taps[0].negflag |
1572 | 1573 | # Require one negated and one non-negated in taps 1 and 2. |
1573 | | - assert taps[1].negflag != taps[2].negflag |
| 1574 | + assert_not_equal(taps[1].negflag, taps[2].negflag) |
1574 | 1575 | # Require one negated and one non-negated in taps 3 and 4. |
1575 | | - assert taps[3].negflag != taps[4].negflag |
| 1576 | + assert_not_equal(taps[3].negflag, taps[4].negflag) |
1576 | 1577 | # Require one negated and one non-negated in taps 5 and 6. |
1577 | | - assert taps[5].negflag != taps[6].negflag |
| 1578 | + assert_not_equal(taps[5].negflag, taps[6].negflag) |
1578 | 1579 |
|
1579 | 1580 | cblks = [{leaf: get({**DEFAULT_CONTEXT, 'tap': taps[i], 'leaf': leaf}, 'controlblock') for leaf in taps[i].leaves} for i in range(7)] |
1580 | 1581 | # Require one swapped and one unswapped in taps 3 and 4. |
1581 | | - assert (cblks[3]['0'][33:65] < cblks[3]['1'][33:65]) != (cblks[4]['0'][33:65] < cblks[4]['1'][33:65]) |
| 1582 | + assert_not_equal((cblks[3]['0'][33:65] < cblks[3]['1'][33:65]), (cblks[4]['0'][33:65] < cblks[4]['1'][33:65])) |
1582 | 1583 | # Require one swapped and one unswapped in taps 5 and 6, both at the top and child level. |
1583 | | - assert (cblks[5]['0'][33:65] < cblks[5]['1'][65:]) != (cblks[6]['0'][33:65] < cblks[6]['1'][65:]) |
1584 | | - assert (cblks[5]['1'][33:65] < cblks[5]['2'][33:65]) != (cblks[6]['1'][33:65] < cblks[6]['2'][33:65]) |
| 1584 | + assert_not_equal((cblks[5]['0'][33:65] < cblks[5]['1'][65:]), (cblks[6]['0'][33:65] < cblks[6]['1'][65:])) |
| 1585 | + assert_not_equal((cblks[5]['1'][33:65] < cblks[5]['2'][33:65]), (cblks[6]['1'][33:65] < cblks[6]['2'][33:65])) |
1585 | 1586 | # Require within taps 5 (and thus also 6) that one level is swapped and the other is not. |
1586 | | - assert (cblks[5]['0'][33:65] < cblks[5]['1'][65:]) != (cblks[5]['1'][33:65] < cblks[5]['2'][33:65]) |
| 1587 | + assert_not_equal((cblks[5]['0'][33:65] < cblks[5]['1'][65:]), (cblks[5]['1'][33:65] < cblks[5]['2'][33:65])) |
1587 | 1588 |
|
1588 | 1589 | # Compute a deterministic set of scriptPubKeys |
1589 | 1590 | tap_spks = [] |
|
0 commit comments