https://travis-ci.org/github/bitcoin/bitcoin/jobs/680452476#L6107
{
    return RPCHelpMan{"upgradewallet",
        "\nUpgrade the wallet. Upgrades to the latest version if no version number is specified\n"
        "New keys may be generated and a new wallet backup will need to be made.",
        {
            {"version", RPCArg::Type::NUM,  strprintf("%d", FEATURE_LATEST), "The version number to upgrade to. Default is the latest wallet version"}
        },
        RPCResults{},
        RPCExamples{
            HelpExampleCli("upgradewallet", "169900")
            + HelpExampleRpc("upgradewallet", "169900")
        },
        [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
    std::shared_ptr<CWallet> const wallet = GetWalletForJSONRPCRequest(request);
    if (!wallet) return NullUniValue;
    CWallet* const pwallet = wallet.get();
    RPCTypeCheck(request.params, {UniValue::VNUM}, true);
    EnsureWalletIsUnlocked(pwallet);
    int version = 0;
    if (!request.params[0].isNull()) {
        version = request.params[0].get_int();