refactor: Make error() return type void
This is needed for the next commit to compile.
This commit is contained in:
2 files changed
+3
-3
No files matched your search
+1
-2
@@ -264,10 +264,9 @@ static inline void LogPrintf_(const std::string& logging_function, const std::st
|
|||||||
#define LogPrint(category, ...) LogDebug(category, __VA_ARGS__)
|
#define LogPrint(category, ...) LogDebug(category, __VA_ARGS__)
|
||||||
|
|
||||||
template <typename... Args>
|
template <typename... Args>
|
||||||
bool error(const char* fmt, const Args&... args)
|
void error(const char* fmt, const Args&... args)
|
||||||
{
|
{
|
||||||
LogPrintf("ERROR: %s\n", tfm::format(fmt, args...));
|
LogPrintf("ERROR: %s\n", tfm::format(fmt, args...));
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // BITCOIN_LOGGING_H
|
#endif // BITCOIN_LOGGING_H
|
||||||
@@ -1102,9 +1102,10 @@ bool BlockManager::ReadRawBlockFromDisk(std::vector<uint8_t>& block, const FlatF
|
|||||||
filein >> blk_start >> blk_size;
|
filein >> blk_start >> blk_size;
|
||||||
|
|
||||||
if (blk_start != GetParams().MessageStart()) {
|
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(blk_start),
|
||||||
HexStr(GetParams().MessageStart()));
|
HexStr(GetParams().MessageStart()));
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (blk_size > MAX_SIZE) {
|
if (blk_size > MAX_SIZE) {
|
||||||
|
|||||||
Reference in new issue
Block a user