https://travis-ci.org/github/bitcoin/bitcoin/jobs/680452476#L6107
{
    FlatSigningProvider key_provider;
    const auto desc = Parse(descriptor, key_provider, error,  false);
    if (desc) {
        if (desc->IsRange()) {
            throw JSONRPCError(RPC_INVALID_PARAMETER, "Ranged descriptor not accepted. Maybe pass through deriveaddresses first?");
        }
        FlatSigningProvider provider;
        std::vector<CScript> scripts;
        if (!desc->Expand(0, key_provider, scripts, provider)) {
            throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, strprintf("Cannot derive script without private keys"));
        }
        
        CHECK_NONFATAL(scripts.size() > 0 && scripts.size() <= 4);
        if (scripts.size() == 1) {
            script = scripts.at(0);
        } else if (scripts.size() == 4) {
            
            script = scripts.at(2);
        } else {
            
            script = scripts.at(1);
        }
        return true;
    } else {
        return false;
    }
}
static RPCHelpMan generatetodescriptor()