This is to track the regression introduced in master, which needs fixing for 0.14. See #9240, #9371, etc.
{
    int64_t start = GetTimeMicros();
    std::map<uint256, CAmount> mapDeltas;
    std::vector<TxMempoolInfo> vinfo;
    {
        LOCK(mempool.cs);
        for (const auto &i : mempool.mapDeltas) {
            mapDeltas[i.first] = i.second.second;
        }
        vinfo = mempool.infoAll();
    }
    int64_t mid = GetTimeMicros();
    try {
        FILE* filestr = fopen((GetDataDir() / "mempool.dat.new").string().c_str(), "w");
        if (!filestr) {
            return;
        }
        CAutoFile file(filestr, SER_DISK, CLIENT_VERSION);
        uint64_t version = MEMPOOL_DUMP_VERSION;
        file << version;