From b5dddf29cd397f80ae20bcc171d93305e6dfe94b Mon Sep 17 00:00:00 2001 From: Patrick Lodder Date: Sun, 24 Aug 2014 13:27:58 +0200 Subject: Condense retarget debug output even more. --- src/main.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/main.cpp') 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(); + unsigned int nNewBits = bnNew.GetCompact(); + /// 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()); + LogPrintf("GetNextWorkRequired() : RETARGET; target: %d, actual: %d, modulated: %d, before: %08x, after: %08x\n", + retargetTimespan, nActualTimespan, nModulatedTimespan, pindexLast->nBits, nNewBits); - return bnNew.GetCompact(); + return nNewBits; } bool CheckProofOfWork(uint256 hash, unsigned int nBits) -- cgit v1.2.3