Skip to content

Commit

Permalink
Condense retarget debug output even more.
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklodder committed Aug 24, 2014
1 parent 328b797 commit b5dddf2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b5dddf2

Please sign in to comment.