From fa808fb74972637840675e310f6d4a0f06028d61 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Thu, 11 Jan 2024 19:19:04 +0100 Subject: [PATCH] refactor: Make error() return type void This is needed for the next commit to compile. --- src/logging.h | 3 +-- src/node/blockstorage.cpp | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/logging.h b/src/logging.h index 525e0aec6d7..abeb9592153 100644 --- a/src/logging.h +++ b/src/logging.h @@ -264,10 +264,9 @@ static inline void LogPrintf_(const std::string& logging_function, const std::st #define LogPrint(category, ...) LogDebug(category, __VA_ARGS__) template -bool error(const char* fmt, const Args&... args) +void error(const char* fmt, const Args&... args) { LogPrintf("ERROR: %s\n", tfm::format(fmt, args...)); - return false; } #endif // BITCOIN_LOGGING_H diff --git a/src/node/blockstorage.cpp b/src/node/blockstorage.cpp index ed59bbfe5d5..ad1b3acedf1 100644 --- a/src/node/blockstorage.cpp +++ b/src/node/blockstorage.cpp @@ -1102,9 +1102,10 @@ bool BlockManager::ReadRawBlockFromDisk(std::vector& block, const FlatF filein >> blk_start >> blk_size; if (blk_start != GetParams().MessageStart()) { - return error("%s: Block magic mismatch for %s: %s versus expected %s", __func__, pos.ToString(), + error("%s: Block magic mismatch for %s: %s versus expected %s", __func__, pos.ToString(), HexStr(blk_start), HexStr(GetParams().MessageStart())); + return false; } if (blk_size > MAX_SIZE) {