aboutsummaryrefslogtreecommitdiff
path: root/src/addrdb.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-02-18 13:34:18 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-02-18 15:08:35 +0100
commitfaf48f20f196e418b2eea390a0140db3604cfa15 (patch)
tree8353e897c780c479d72cd409550826f9da0cde18 /src/addrdb.cpp
parentdb656db2ed5aecc6e623fd3ef1e1bb34207b9e57 (diff)
downloadbitcoin-faf48f20f196e418b2eea390a0140db3604cfa15.tar.xz
log: Clarify log message when file does not exist
Also, run clang-format on the function
Diffstat (limited to 'src/addrdb.cpp')
-rw-r--r--src/addrdb.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/addrdb.cpp b/src/addrdb.cpp
index 8f77ed35ce..0922c1c432 100644
--- a/src/addrdb.cpp
+++ b/src/addrdb.cpp
@@ -109,15 +109,15 @@ template <typename Data>
bool DeserializeFileDB(const fs::path& path, Data& data)
{
// open input file, and associate with CAutoFile
- FILE *file = fsbridge::fopen(path, "rb");
+ FILE* file = fsbridge::fopen(path, "rb");
CAutoFile filein(file, SER_DISK, CLIENT_VERSION);
- if (filein.IsNull())
- return error("%s: Failed to open file %s", __func__, path.string());
-
+ if (filein.IsNull()) {
+ LogPrintf("Missing or invalid file %s\n", path.string());
+ return false;
+ }
return DeserializeDB(filein, data);
}
-
-}
+} // namespace
CBanDB::CBanDB(fs::path ban_list_path) : m_ban_list_path(std::move(ban_list_path))
{