aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorPatrick Lodder <[email protected]>2014-08-24 13:27:58 +0200
committerPatrick Lodder <[email protected]>2014-08-24 13:51:25 +0200
commitb5dddf29cd397f80ae20bcc171d93305e6dfe94b (patch)
tree0314e8e4cfd9810cea1f7c3a8547e973c57ae23c /src/main.cpp
parentMerge pull request #650 from PartTimeLegend/patch-15 (diff)
downloadarchived-discoin-b5dddf29cd397f80ae20bcc171d93305e6dfe94b.tar.xz
archived-discoin-b5dddf29cd397f80ae20bcc171d93305e6dfe94b.zip
Condense retarget debug output even more.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp9
1 files changed, 5 insertions, 4 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();
+ 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)