Change new constants in txdb.h to int64_t #3703

pull laanwj wants to merge 1 commits into bitcoin:master from laanwj:2014_02_txdb_constants_int64 changing 2 files +4 −4
  1. laanwj commented at 4:14 PM on February 18, 2014: member

    A shift overflow was happening when using these to check against in init.cpp. Fixes #3702.

  2. Change new constants in txdb.h to int64_t
    A shift overflow was happening when using these to check against in init.cpp.
    Fixes #3702.
    ad54a9b83f
  3. laanwj commented at 4:28 PM on February 18, 2014: member

    Maybe it'd be better to change the constants to bytes (move the shifts to the constants instead of at the comparison site in init.cpp). Showing in MiB is only UI/commandline-level. Regardless, you need shifts at either place.

  4. BitcoinPullTester commented at 4:32 PM on February 18, 2014: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/ad54a9b83f416d6bbd84eaaec55bf1e6f56308b1 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. Diapolo commented at 5:31 PM on February 18, 2014: none

    I'm sorry this happened, but my compiler didn't give any warning. Also I'm not the one who introduced the shifts, that was sipa ;), I'm more comfortable with 4 * 1024 * 1024 for example.

  6. gavinandresen commented at 6:24 PM on February 18, 2014: contributor

    ACK, makes clang happy.

  7. laanwj commented at 7:31 AM on February 19, 2014: member

    @Diapolo Using multiplications instead of shifts would have resulted in the same problem. No hard feelings, this caught me unaware as well, in the 2010's we're casually veering outside the bounds of 32-bit types even for memory sizes.

  8. laanwj referenced this in commit 7f080fbef7 on Feb 19, 2014
  9. laanwj merged this on Feb 19, 2014
  10. laanwj closed this on Feb 19, 2014

  11. laanwj deleted the branch on Apr 9, 2014
  12. 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 15:16 UTC

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