<!-- Describe the issue -->
The sortedmulti expression in descriptors seems to not be recognized.
Expected behavior
Take the sortedmulti example from the descriptor document and pass it to getdescriptorinfo.
$ bitcoin-cli getdescriptorinfo "wsh(sortedmulti(1,xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB/1/0/*,xpub69H7F5d8KSRgmmdJg2KhpAK8SR3DjMwAdkxj3ZuxV27CprR9LgpeyGmXUbC6wb7ERfvrnKZjXoUmmDznezpbZb7ap6r1D3tgFxHmwMkQTPH/0/0/*))"
error code: -5
error message:
A function is needed within P2WSH
Actual behavior
Changing sortedmulti to multi no longer results in the error.
$ bitcoin-cli getdescriptorinfo "wsh(multi(1,xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB/1/0/*,xpub69H7F5d8KSRgmmdJg2KhpAK8SR3DjMwAdkxj3ZuxV27CprR9LgpeyGmXUbC6wb7ERfvrnKZjXoUmmDznezpbZb7ap6r1D3tgFxHmwMkQTPH/0/0/*))"
{
"descriptor": "wsh(multi(1,xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB/1/0/*,xpub69H7F5d8KSRgmmdJg2KhpAK8SR3DjMwAdkxj3ZuxV27CprR9LgpeyGmXUbC6wb7ERfvrnKZjXoUmmDznezpbZb7ap6r1D3tgFxHmwMkQTPH/0/0/*))#t2zpj2eu",
"checksum": "t2zpj2eu",
"isrange": true,
"issolvable": true,
"hasprivatekeys": false
}
To reproduce
Run the above getdescriptorinfo command, or with any descriptor involving sortedmulti.
System information
Running Bitcoin Core version v0.19.0.1 (64-bit). Release version which I downloaded from bitcoincore.org
$ uname -a
Linux username 4.4.0-142-generic [#168](/bitcoin-bitcoin/168/)-Ubuntu SMP Wed Jan 16 21:00:45 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux