Simplify and rename CheckWork to ProcessBlockFound #4603
pull jtimon wants to merge 1 commits into bitcoin:master from jtimon:miner changing 1 files +4 −11-
jtimon commented at 10:37 pm on July 29, 2014: contributor6 lines less with no functional difference.
-
in src/miner.cpp: in 16b2944d41 outdated
490@@ -500,7 +491,10 @@ void static BitcoinMiner(CWallet *pwallet) 491 assert(hash == pblock->GetHash()); 492 493 SetThreadPriority(THREAD_PRIORITY_NORMAL); 494- CheckWork(pblock, *pwallet, reservekey); 495+ //// debug print 496+ LogPrintf("BitcoinMiner:\n"); 497+ LogPrintf("proof-of-work found \n hash: %s \ntarget: %s\n", hash.GetHex(), hashTarget.GetHex());
sipa commented at 11:19 pm on July 29, 2014:You will print “proof-of-work found” for attempts that do not match the target.
sipa commented at 11:27 pm on July 29, 2014:Apologies, it seems we checked the hash vs target twice (and a third time inside ProcessBlock!), and you’re removing one. Good. -
gavinandresen commented at 11:20 pm on July 29, 2014: contributorACK. nit: I’d delete the useless comment: //// debug print
-
jtimon commented at 0:21 am on July 30, 2014: contributorDone, now it’s 7 lines less.
-
Simplify and rename CheckWork to ProcessBlockFound f0c2915f66
-
BitcoinPullTester commented at 0:46 am on July 30, 2014: noneAutomatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/p4603_f0c2915f66ade456c9d7847ea64fef09e1a12975/ for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.
-
jgarzik commented at 2:30 am on July 30, 2014: contributorut ACK
-
laanwj added the label Improvement on Jul 31, 2014
-
laanwj merged this on Aug 12, 2014
-
laanwj closed this on Aug 12, 2014
-
laanwj referenced this in commit a38a98c476 on Aug 12, 2014
-
jtimon deleted the branch on Aug 12, 2014
-
jonasschnelli referenced this in commit 2a72e92ffc on Dec 29, 2014
-
MarcoFalke locked this on Sep 8, 2021