Skip to content

Commit 8626e8f

Browse files
committed
Improve hash mismatch warning log message.
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.
1 parent 3140a94 commit 8626e8f

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)