When `peers.dat` is corrupted an error message is shown: `Invalid or corrupt peers.dat (Checksum mismatch, data corrupted).` then the node restart.

Most of our users aren't really tech enough to manually delete the `peers.dat` files, nor can we detect it for them. It means that this error give us lot's of work on our support team when somebody is impacted.

`peers.dat` isn't an essential file, as such Bitcoin Core should just be fine restarting without crashing.

A bash workaround to detect the checksum mismatch would also considerably help us.
{
    
    const uint16_t randv{GetRand<uint16_t>()};
    std::string tmpfn = strprintf("%s.%04x", prefix, randv);
    
    fs::path pathTmp = gArgs.GetDataDirNet() / fs::u8path(tmpfn);
    FILE *file = fsbridge::fopen(pathTmp, "wb");
    CAutoFile fileout(file, SER_DISK, version);
    if (fileout.IsNull()) {
        fileout.fclose();
        remove(pathTmp);
        return error("%s: Failed to open file %s", __func__, fs::PathToString(pathTmp));
    }
    
    if (!SerializeDB(fileout, data)) {
        fileout.fclose();
        remove(pathTmp);
        return false;
    }
    if (!FileCommit(fileout.Get())) {
        fileout.fclose();
        remove(pathTmp);
        return error("%s: Failed to flush file %s", __func__, fs::PathToString(pathTmp));
    }
    fileout.fclose();