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
  1. jtimon commented at 10:37 PM on July 29, 2014: contributor

    6 lines less with no functional difference.

  2. in src/miner.cpp:None 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.

  3. gavinandresen commented at 11:20 PM on July 29, 2014: contributor

    ACK. nit: I'd delete the useless comment: //// debug print

  4. jtimon commented at 12:21 AM on July 30, 2014: contributor

    Done, now it's 7 lines less.

  5. Simplify and rename CheckWork to ProcessBlockFound f0c2915f66
  6. BitcoinPullTester commented at 12:46 AM on July 30, 2014: none

    Automatic 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.

  7. jgarzik commented at 2:30 AM on July 30, 2014: contributor

    ut ACK

  8. laanwj added the label Improvement on Jul 31, 2014
  9. jtimon commented at 7:55 AM on August 12, 2014: contributor

    Ping @laanwj removing code here too.

  10. laanwj merged this on Aug 12, 2014
  11. laanwj closed this on Aug 12, 2014

  12. laanwj referenced this in commit a38a98c476 on Aug 12, 2014
  13. jtimon deleted the branch on Aug 12, 2014
  14. jonasschnelli referenced this in commit 2a72e92ffc on Dec 29, 2014
  15. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me