Preemptively catch a few potential bugs #5580

pull luke-jr wants to merge 2 commits into bitcoin:master from luke-jr:201412-catch_bugs changing 2 files +7 −1
  1. luke-jr commented at 3:31 AM on December 31, 2014: member

    This causes CCoinsViewCache(CCoinsViewCache) to fail at compile-time rather than copy an existing cache (most likely the caller intends to sub-cache it)

    It also makes ConnectBlock's fJustCheck work correctly for the genesis block, just in case it gets in there somehow.

  2. Make CCoinsViewCache's copy constructor private
    It is easily confused with CCoinsViewCache(CCoinsView*), which creates a sub-cache, but instead of creating a sub-cache, the copy constructor would copy the original and use that original's base, defeating the intended isolation.
    228d238525
  3. Bugfix: ConnectBlock: In case the genesis block gets in with fJustCheck, behave correctly 1b178a7f96
  4. laanwj commented at 8:48 AM on December 31, 2014: member

    utACK

  5. laanwj added the label Improvement on Dec 31, 2014
  6. sipa commented at 11:22 AM on December 31, 2014: member

    utACK

  7. laanwj merged this on Jan 2, 2015
  8. laanwj closed this on Jan 2, 2015

  9. laanwj referenced this in commit 40d65eb66d on Jan 2, 2015
  10. luke-jr deleted the branch on Jan 5, 2015
  11. random-zebra referenced this in commit d45c58e89d on May 20, 2020
  12. MarcoFalke locked this on Sep 8, 2021
Contributors

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-14 15:15 UTC

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