<p>When trying:</p>

<pre><code>bitcoin-cli getdescriptorinfo "wsh(sortedmulti(2,tpubDFck48zH8ZzteKKZCR9WMVBJwHZayhQmtCDyDRzHsU7VMTwEXohD23h1CBiizKtFtWck2fVegNDRM193nGx3VLs1RTSGNc1iePKpc1JvsS6/*,tpubDEfXroYtWB6rQ1vNuCUAErUJtxSQ6bjxtz63rWWRaByADcudNFtV6HZz5PM7yeXQLG4GWmrdcRkMEGgdXWWu5TyuRpMXURCiwJoGQYH743f/*,tpubDFSz52YB4yCdbgKeLB5BcJfW1f1AzmLcdzB3nGz6Yft2MVHy2rj4uXBFT8d3maYS4rCxjJdBfExJAM9JCjWmYzkJyaLP4Rk8nALDUSfWbT8/*))"

</code></pre>

<p>I get:</p>

<pre><code>error code: -5
error message:
A function is needed within P2WSH
</code></pre>

<p>What am I doing wrong?</p>

CC BY-SA 4.0
2020-01-15T16:24:26.680Z
This call works fine for me. What version of the code are you using? `sortedmulti` is not in 0.19, only in master (and will be in 0.20).
Pieter Wuille
CC BY-SA 4.0
2020-01-16T18:34:10.963Z
ahh ok, will update
Fontaine
<bitcoin-core><json-rpc><output-script-descriptors>
why is getdescriptorinfo returning a "function needed" error with a sortedmulti descriptor?
Fontaine
# why is getdescriptorinfo returning a "function needed" error with a sortedmulti descriptor?

(Asked by: username_0 on 2020-01-15)

When trying:
bitcoin-cli getdescriptorinfo "wsh(sortedmulti(2,tpubDFck48zH8ZzteKKZCR9WMVBJwHZayhQmtCDyDRzHsU7VMTwEXohD23h1CBiizKtFtWck2fVegNDRM193nGx3VLs1RTSGNc1iePKpc1JvsS6/*,tpubDEfXroYtWB6rQ1vNuCUAErUJtxSQ6bjxtz63rWWRaByADcudNFtV6HZz5PM7yeXQLG4GWmrdcRkMEGgdXWWu5TyuRpMXURCiwJoGQYH743f/*,tpubDFSz52YB4yCdbgKeLB5BcJfW1f1AzmLcdzB3nGz6Yft2MVHy2rj4uXBFT8d3maYS4rCxjJdBfExJAM9JCjWmYzkJyaLP4Rk8nALDUSfWbT8/*))"


I get:
error code: -5
error message:
A function is needed within P2WSH

What am I doing wrong?

**Tags:** bitcoin-core, json-rpc, output-script-descriptors

> **Comments:**
> **username_1**: This call works fine for me. What version of the code are you using? `sortedmulti` is not in 0.19, only in master (and will be in 0.20).  
> **username_0**: ahh ok, will update  

---

## 0 answers

