Skip to content

Commit f9fc5ea

Browse files
Merge #954: [Logging] Improve hash mismatch warning log message.
8626e8f Improve hash mismatch warning log message. (Zannick) Pull request description: Previously, it was logging "Block 2: ..." when 2 was the status, which is fairly misleading. Now, output both the height and the status and make clear which is which. ### Tested Mildly, during my other regtest runs, and startup for testnet. Tree-SHA512: 7380d6e8333f1ae7e9f40778fa85a773e1d7ec0420f6438f387c5c6c287171abed2e5062b431cc59dee09a09f0cae71e4b4244b5c054b44fb1d301ddb8c1af62
2 parents 513bdfc + 8626e8f commit f9fc5ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/txdb.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,8 @@ bool CBlockTreeDB::LoadBlockIndexGuts(const Consensus::Params& consensusParams,
285285
// ignore any duplicates and mark them to be erased
286286
uint256 hashBlock = diskindex.GetBlockHash();
287287
if (hashBlock != key.second) {
288-
LogPrintf("%s: Skipping Block %d: %s - Block Hash does not match Index Key\n",
289-
__func__, diskindex.nStatus, hashBlock.GetHex());
288+
LogPrintf("%s: Skipping Block %d (status=%d): %s - Block Hash does not match Index Key\n",
289+
__func__, diskindex.nHeight, diskindex.nStatus, hashBlock.GetHex());
290290
pcursor->Next();
291291
continue;
292292
}

0 commit comments

Comments
 (0)