mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-21 07:39:08 +01:00
28a4fcb03ctest: check listdescriptors do not return a mix of hardened derivation marker (pythcoiner)975783cb79descriptor: 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 ACK28a4fcb03cachow101: ACK28a4fcb03crkrux: Concept ACK28a4fcb03cTree-SHA512: 15d14000b5951ca69a64a05b9a0b138c48a07b81eaf2fa86b91ac20cc8735533355a787363c64ba88403dd8a56ef5232cba57d34bea80835a0f40774d62fbc2b