CreateNewBlock / getblocktemplate cleaning #2928

pull jgarzik wants to merge 3 commits into bitcoin:master from jgarzik:cnb-txout changing 4 files +28 −20
  1. jgarzik commented at 4:54 AM on August 24, 2013: contributor

    Assuming no bugs, this pull request should present zero behavior changes.

    It presents equivalent transformations that eliminate a needless getblocktemplate dependency.

    Fixing this dependency is a blocker for no-wallet mode #2901 which will be rebased on top of this pull.

    Tests fine, hopefully quick to review and ACK.

  2. CreateNewBlock() now takes scriptPubKey argument,
    rather than a key.
    
    CreateNewBlockWithKey() helper is added to restore existing functionality,
    making this an equivalent-transformation change.
    7e17018995
  3. RPC: getblocktemplate does not require a key, to create a block template
    getblocktemplate only uses certain portions of the coinbase transaction,
    notably ignoring the coinbase TX output entirely.
    
    Use CreateNewBlock() rather than CreateNewBlockWithKey(), eliminating
    the needless key passing.
    
    Should be zero behavior changes.
    7bb0f6c5e8
  4. BitcoinPullTester commented at 5:25 AM on August 24, 2013: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/7bb0f6c5e89a4d5c9a6ef42f5643f42646da44c9 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.

  5. gavinandresen commented at 12:32 AM on August 25, 2013: contributor

    ACK

  6. sipa commented at 2:57 PM on August 25, 2013: member

    ACK

  7. miner: constify CreateNewBlock() arg scriptPubKeyIn f1dbed9233
  8. in src/miner.cpp:None in 7bb0f6c5e8 outdated
     140 | @@ -141,7 +141,7 @@ class TxPriorityCompare
     141 |      }
     142 |  };
     143 |  
     144 | -CBlockTemplate* CreateNewBlock(CReserveKey& reservekey)
     145 | +CBlockTemplate* CreateNewBlock(CScript& scriptPubKeyIn)
    


    sipa commented at 2:58 PM on August 25, 2013:

    Nit: scriptPubKeyIn can be const.

  9. BitcoinPullTester commented at 1:03 AM on August 26, 2013: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/f1dbed9233fb138026c646db0ac34e83ae2114f1 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.

  10. jgarzik commented at 1:49 AM on August 26, 2013: contributor

    Fixed @sipa nit.

  11. jgarzik referenced this in commit bb7d0fc12f on Aug 26, 2013
  12. jgarzik merged this on Aug 26, 2013
  13. jgarzik closed this on Aug 26, 2013

  14. jgarzik deleted the branch on Aug 24, 2014
  15. Bushstar referenced this in commit acbf0a2211 on Apr 8, 2020
  16. DrahtBot 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-13 21:16 UTC

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