Commit 53b7237
committed
Merge bitcoin/bitcoin#31734: miniscript: account for all
28a4fcb test: check listdescriptors do not return a mix of hardened derivation marker (pythcoiner)
975783c descriptor: account for all StringType in MiniscriptDescriptor::ToStringHelper() (pythcoiner)
Pull request description:
In `MiniscriptDescriptor::ToStringHelper()` only the `StringType::Private` variant of the `type` argument was handled. This PR implements serializing w/ all variants of `StringType` & add a functional test for the descriptor triggering the related issue.
Closes #31694: previously when calling `listdescriptors` RPC on a wallet containing a taproot descriptor w/ a (miniscript) taptree, origins of internal key & taptree were serialized w/ differents hardened derivation markers:
- origin of the internal key were serialized w/ `StringType::Normalized` type (using `h` as marker)
- origins of taptree keys were serialized w/ `StringType::Private` type (using `'` as marker)
Note: Origins in segwit (`wsh()`) miniscript descriptors were also serialized w/ `StringType::Private` type (`'` marker) and are now serialized w/ `StringType::Normalized` type (`h` marker).
ACKs for top commit:
sipa:
Code review ACK 28a4fcb
achow101:
ACK 28a4fcb
rkrux:
Concept ACK 28a4fcb
Tree-SHA512: 15d14000b5951ca69a64a05b9a0b138c48a07b81eaf2fa86b91ac20cc8735533355a787363c64ba88403dd8a56ef5232cba57d34bea80835a0f40774d62fbc2bStringType variants in Miniscriptdescriptor::ToString()
File tree
2 files changed
+41
-8
lines changed- src/script
- test/functional
2 files changed
+41
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1483 | 1483 | | |
1484 | 1484 | | |
1485 | 1485 | | |
1486 | | - | |
1487 | | - | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
1488 | 1489 | | |
1489 | 1490 | | |
1490 | | - | |
1491 | | - | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
1492 | 1496 | | |
1493 | 1497 | | |
1494 | 1498 | | |
1495 | 1499 | | |
1496 | | - | |
1497 | | - | |
1498 | | - | |
| 1500 | + | |
| 1501 | + | |
1499 | 1502 | | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
1500 | 1513 | | |
1501 | 1514 | | |
1502 | 1515 | | |
| |||
1529 | 1542 | | |
1530 | 1543 | | |
1531 | 1544 | | |
1532 | | - | |
| 1545 | + | |
1533 | 1546 | | |
1534 | 1547 | | |
1535 | 1548 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
129 | 149 | | |
130 | 150 | | |
131 | 151 | | |
0 commit comments