Skip to content

Commit fa808fb

Browse files
author
MarcoFalke
committed
refactor: Make error() return type void
This is needed for the next commit to compile.
1 parent fa1d624 commit fa808fb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/logging.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,9 @@ static inline void LogPrintf_(const std::string& logging_function, const std::st
264264
#define LogPrint(category, ...) LogDebug(category, __VA_ARGS__)
265265

266266
template <typename... Args>
267-
bool error(const char* fmt, const Args&... args)
267+
void error(const char* fmt, const Args&... args)
268268
{
269269
LogPrintf("ERROR: %s\n", tfm::format(fmt, args...));
270-
return false;
271270
}
272271

273272
#endif // BITCOIN_LOGGING_H

src/node/blockstorage.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1102,9 +1102,10 @@ bool BlockManager::ReadRawBlockFromDisk(std::vector<uint8_t>& block, const FlatF
11021102
filein >> blk_start >> blk_size;
11031103

11041104
if (blk_start != GetParams().MessageStart()) {
1105-
return error("%s: Block magic mismatch for %s: %s versus expected %s", __func__, pos.ToString(),
1105+
error("%s: Block magic mismatch for %s: %s versus expected %s", __func__, pos.ToString(),
11061106
HexStr(blk_start),
11071107
HexStr(GetParams().MessageStart()));
1108+
return false;
11081109
}
11091110

11101111
if (blk_size > MAX_SIZE) {

0 commit comments

Comments
 (0)