From fe46773bed010c5ac3a5c24354106d8d8fae4fc7 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Mon, 29 Mar 2021 17:46:35 -0400 Subject: [PATCH] Log more data about incorrect diffbits --- src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 87ddc9669..dd152dadb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5050,9 +5050,9 @@ bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& sta // " " << block.nBits << " block.nBits vs. calc " << nNextWork << // " " << block.GetHash().ToString() << " @ " << block.GetBlockTime() << endl; - return state.DoS(100, error("%s: Incorrect diffbits at height %d", __func__, nHeight), REJECT_INVALID, "bad-diffbits"); + return state.DoS(100, error("%s: Incorrect diffbits at height %d: %lu vs %lu ", __func__, nHeight, nNextWork, block.nBits), REJECT_INVALID, "bad-diffbits"); } else { - //LogPrintf("%s: Ignoring nbits calc : %lu vs block %lu\n",__func__, nNextWork, block.nBits ); + LogPrintf("%s: Ignoring nbits calc : %lu vs block %lu\n",__func__, nNextWork, block.nBits ); cout << "Ignoring nbits for height=" << nHeight << endl; } }