From b5dddf29cd397f80ae20bcc171d93305e6dfe94b Mon Sep 17 00:00:00 2001 From: Patrick Lodder Date: Sun, 24 Aug 2014 13:27:58 +0200 Subject: [PATCH] Condense retarget debug output even more. --- src/main.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 6cf08aced..3395395d1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1389,12 +1389,13 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead if (bnNew > Params().ProofOfWorkLimit()) bnNew = Params().ProofOfWorkLimit(); - /// debug print - LogPrintf("RETARGET: target: %d, actual: %d, modulated: %d\n", retargetTimespan, nActualTimespan, nModulatedTimespan); - LogPrintf("Before: %08x %s\n", pindexLast->nBits, CBigNum().SetCompact(pindexLast->nBits).getuint256().ToString()); - LogPrintf("After: %08x %s\n", bnNew.GetCompact(), bnNew.getuint256().ToString()); + unsigned int nNewBits = bnNew.GetCompact(); - return bnNew.GetCompact(); + /// debug print + LogPrintf("GetNextWorkRequired() : RETARGET; target: %d, actual: %d, modulated: %d, before: %08x, after: %08x\n", + retargetTimespan, nActualTimespan, nModulatedTimespan, pindexLast->nBits, nNewBits); + + return nNewBits; } bool CheckProofOfWork(uint256 hash, unsigned int nBits)