Issue Details

Number
28943
Title
Inconsistent Descriptor Space Parsing
Description
### Is there an existing issue for this? - [x] I have searched the existing issues ### Current behaviour Sometimes, it is possible to have trailing spaces in a Descriptor and sometimes not. For example: * `getdescriptorinfo "wsh(multi(2, KzLnMBHHwTs7uUo9UfUxCboj5Urvigx2v7t6iAqhBk2PM4fBMcig , L1S2VZsNYexzyH76CPi1EvrNSoEHsiT12UaR4BTiycmCKqRnSqLY ))"` Output: ``` { "descriptor": "wsh(multi(2,03147a8994e451cb10891688c9db15aea6d62a2691c781678bf7fb3a36e58ccca6,0366b8ab537286e57187eaa8eff803621271500ec496e1e03ef40b9cca6c7a1d1c))#x3mm5nm9", "checksum": "xxgjqes0", "isrange": false, "issolvable": true, "hasprivatekeys": true } ``` * `getdescriptorinfo "wsh( multi(2, KzLnMBHHwTs7uUo9UfUxCboj5Urvigx2v7t6iAqhBk2PM4fBMcig , L1S2VZsNYexzyH76CPi1EvrNSoEHsiT12UaR4BTiycmCKqRnSqLY ) )"` Output: ``` A function is needed within P2WSH (code -5) ``` * `getdescriptorinfo "wsh(multi(2, 03147a8994e451cb10891688c9db15aea6d62a2691c781678bf7fb3a36e58ccca6, 0366b8ab537286e57187eaa8eff803621271500ec496e1e03ef40b9cca6c7a1d1c))"` Output: ``` Multi: key ' 03147a8994e451cb10891688c9db15aea6d62a2691c781678bf7fb3a36e58ccca6' is not valid (code -5) ``` ### Expected behaviour Consistence: either never allow spaces, or always allow them, but not both. ### Steps to reproduce Open Bitcoin-Qt Console and run the commands above. ### Relevant log output _No response_ ### How did you obtain Bitcoin Core Compiled from source ### What version of Bitcoin Core are you using? master@5f9fd11680af43b0d0d80a6aa4f315aa04afeac4 ### Operating system and version Debian 12 ### Machine specifications _No response_
URL
https://github.com/bitcoin/bitcoin/issue/28943
Closed by
Back to List