Less getblocks zeros #3990

pull rebroad wants to merge 1 commits into bitcoin:master from rebroad:LessGetblocksZeros changing 1 files +1 −1
  1. rebroad commented at 5:32 AM on April 1, 2014: contributor

    Change these lines:

    getblocks 293326 to 0000000000000000000000000000000000000000000000000000000000000000 limit 500

    to these lines:

    getblocks 293326 to end limit 500

    (i.e. no need to display an expanded hash of NULL)

  2. rebroad commented at 2:40 AM on May 16, 2014: contributor

    @laanwj @sipa @gmaxwell Some comments/ACKS would be appreciated. Thanks.

  3. laanwj commented at 7:22 AM on May 16, 2014: member

    I like printing always the full hash. It used to be different in earlier versions but at a certain point it was decided to change this.

  4. sipa commented at 8:36 AM on May 16, 2014: member

    Indeed. It allows easy copy pasting entries from the log file into RPCs or other services.

  5. laanwj closed this on May 20, 2014

  6. rebroad commented at 11:58 AM on May 21, 2014: contributor

    Please can you look at what this pull request does. It doesn't change the way hashes are displayed as the assumption seems to have been. It simply doesn't display a long line of ONLY zeros when there is NO hash as it does currently.

  7. rebroad commented at 11:59 AM on May 21, 2014: contributor

    @laanwj please can you re-open this pull request, as it was misunderstood what it does. thank you.

  8. laanwj commented at 12:24 PM on May 21, 2014: member

    I still don't really see the point of making a special case for 0.

  9. rebroad commented at 3:27 AM on June 27, 2014: contributor

    @laanwj because 0 isn't a hash, it's like a NULL, so it seems wasteful to fill debug.log with an expanded hash of NULL, when it's not a hash.

  10. laanwj commented at 8:18 AM on June 27, 2014: member

    Right, uint256(0) is a special case here. It's a pity that things were done this way in the protocol, but you can't help that. Reopening.

    If we're special-casing anyway, what about using a string such as "end" or "last" instead of "0"? "To 0" reads like it's trying to requests the blocks to the beginning instead...

  11. laanwj reopened this on Jun 27, 2014

  12. Show only one zero instead of many when getblocks request received with a hashStop of uint256(0) 0dd5d3a009
  13. rebroad commented at 2:56 AM on June 28, 2014: contributor

    @laanwj ah, yes, "end" is more clear. Changed.

  14. BitcoinPullTester commented at 3:55 AM on June 28, 2014: none

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

  15. laanwj commented at 6:58 AM on June 28, 2014: member

    ACK

  16. laanwj merged this on Jun 28, 2014
  17. laanwj closed this on Jun 28, 2014

  18. laanwj referenced this in commit ba81f45607 on Jun 28, 2014
  19. rebroad deleted the branch on Aug 23, 2016
  20. 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-22 18:15 UTC

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