log: Use LogError for fatal errors

This commit is contained in:
MarcoFalke
2025-11-27 10:31:30 +01:00
parent 22229de728
commit fa0018d011
10 changed files with 46 additions and 46 deletions

View File

@@ -32,14 +32,14 @@ bool WriteSnapshotBaseBlockhash(Chainstate& snapshot_chainstate)
FILE* file{fsbridge::fopen(write_to, "wb")};
AutoFile afile{file};
if (afile.IsNull()) {
LogPrintf("[snapshot] failed to open base blockhash file for writing: %s\n",
LogError("[snapshot] failed to open base blockhash file for writing: %s",
fs::PathToString(write_to));
return false;
}
afile << *snapshot_chainstate.m_from_snapshot_blockhash;
if (afile.fclose() != 0) {
LogPrintf("[snapshot] failed to close base blockhash file %s after writing\n",
LogError("[snapshot] failed to close base blockhash file %s after writing",
fs::PathToString(write_to));
return false;
}