https://travis-ci.org/github/bitcoin/bitcoin/jobs/680452476#L6107
{
                        {RPCResult::Type::STR, "filename", "The filename with full absolute path"},
                    }
                },
                RPCExamples{
                    HelpExampleCli("dumpwallet", "\"test\"")
            + HelpExampleRpc("dumpwallet", "\"test\"")
                },
        [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
    std::shared_ptr<CWallet> const pwallet = GetWalletForJSONRPCRequest(request);
    if (!pwallet) return NullUniValue;
    CWallet& wallet = *pwallet;
    LegacyScriptPubKeyMan& spk_man = EnsureLegacyScriptPubKeyMan(wallet);
    
    
    wallet.BlockUntilSyncedToCurrentChain();
    LOCK2(wallet.cs_wallet, spk_man.cs_KeyStore);
    EnsureWalletIsUnlocked(&wallet);
    fs::path filepath = request.params[0].get_str();
    filepath = fs::absolute(filepath);
    /* Prevent arbitrary files from being overwritten. There have been reports
     * that users have overwritten wallet files this way:
     * https://github.com/bitcoin/bitcoin/issues/9934
     * It may also avoid other security issues.
     */
    if (fs::exists(filepath)) {
        throw JSONRPCError(RPC_INVALID_PARAMETER, filepath.string() + " already exists. If you are sure this is what you want, move it out of the way first");
    }
    fsbridge::ofstream file;