Skip to content

Commit

Permalink
Print out proof-of-work and target, if proof-of-work check fails.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Garzik authored and jgarzik committed Mar 16, 2011
1 parent 27b7f3b commit 76b8912
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.cpp
Expand Up @@ -3515,8 +3515,11 @@ bool CheckWork(CBlock* pblock, CReserveKey& reservekey)
uint256 hash = pblock->GetHash();
uint256 hashTarget = CBigNum().SetCompact(pblock->nBits).getuint256();

if (hash > hashTarget)
if (hash > hashTarget) {
printf("proof-of-work check FAILED...\n hash: %s\ntarget: %s\n",
hash.GetHex().c_str(), hashTarget.GetHex().c_str());
return false;
}

//// debug print
printf("BitcoinMiner:\n");
Expand Down

0 comments on commit 76b8912

Please sign in to comment.