Use AutoFile where possible

This commit is contained in:
MacroFake
2022-06-06 17:22:59 +02:00
parent 6666803c89
commit facc2fa7b8
17 changed files with 46 additions and 49 deletions

View File

@@ -3054,7 +3054,7 @@ void CaptureMessageToFile(const CAddress& addr,
fs::create_directories(base_path);
fs::path path = base_path / (is_incoming ? "msgs_recv.dat" : "msgs_sent.dat");
CAutoFile f(fsbridge::fopen(path, "ab"), SER_DISK, CLIENT_VERSION);
AutoFile f{fsbridge::fopen(path, "ab")};
ser_writedata64(f, now.count());
f.write(MakeByteSpan(msg_type));