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.
if (!IsValidDestination(dest)) {
        throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address");
    }
    std::string old_label = pwallet->mapAddressBook[dest].name;
    std::string label = LabelFromValue(request.params[1]);
    if (IsMine(*pwallet, dest)) {
        pwallet->SetAddressBook(dest, label, "receive");
        if (request.strMethod == "setaccount" && old_label != label && dest == GetLabelDestination(pwallet, old_label)) {
            
            GetLabelDestination(pwallet, old_label, true);
        }
    } else {
        pwallet->SetAddressBook(dest, label, "send");
    }
    
    
    
    bool found_address = false;
    for (const std::pair<const CTxDestination, CAddressBookData>& item : pwallet->mapAddressBook) {
        if (item.second.name == label) {
            found_address = true;
            break;
        }
    }
    if (!found_address) {
        pwallet->DeleteLabel(old_label);
    }
    return NullUniValue;
}
static UniValue getaccount(const JSONRPCRequest& request)