addmultisigaddress creates an address respecting the setting, being unable to generate a specific type of address without also adding it to the wallet seems wrong.

I suppose in the future `addresstype` may be refactored to be wallet-specific, which would leave this non-wallet rpc call without an argument. Perhaps there should just be an optional parameter to set it.
const CBlockIndex* paltindex = nullptr; 
    int target_confirms = 1;
    isminefilter filter = ISMINE_SPENDABLE;
    if (!request.params[0].isNull() && !request.params[0].get_str().empty()) {
        uint256 blockId;
        blockId.SetHex(request.params[0].get_str());
        paltindex = pindex = LookupBlockIndex(blockId);
        if (!pindex) {
            throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Block not found");
        }
        if (chainActive[pindex->nHeight] != pindex) {
            
            
            
            pindex = chainActive.FindFork(pindex);
        }
    }
    if (!request.params[1].isNull()) {
        target_confirms = request.params[1].get_int();
        if (target_confirms < 1) {
            throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter");
        }
    }
    if (!request.params[2].isNull() && request.params[2].get_bool()) {
        filter = filter | ISMINE_WATCH_ONLY;
    }
    bool include_removed = (request.params[3].isNull() || request.params[3].get_bool());
    int depth = pindex ? (1 + chainActive.Height() - pindex->nHeight) : -1;
    UniValue transactions(UniValue::VARR);
    for (const std::pair<const uint256, CWalletTx>& pairWtx : pwallet->mapWallet) {