Make sure the genesis block is present after reindex #2249

pull sipa wants to merge 1 commits into bitcoin:master from sipa:reindexgen changing 4 files +36 −20
  1. sipa commented at 8:45 PM on January 30, 2013: member

    Split off InitBlockIndex from LoadBlockIndex, and call it again after finishing reindexing. This makes sure -reindex on an empty datadir still ends up with a sane database.

    Also, protecting the initialization with a try-catch block.

  2. gavinandresen commented at 9:11 PM on January 30, 2013: contributor

    ACK.

    Tested; fixes #2228 and #2239

  3. sipa commented at 9:13 PM on January 30, 2013: member

    No way this fixes #2228 ...

  4. gavinandresen commented at 9:16 PM on January 30, 2013: contributor

    @sipa : I stand corrected: it fixes a variant of #2228 where no IBD was done if you start with an empty data directory and -reindex.

  5. sipa commented at 9:17 PM on January 30, 2013: member

    Ok, that seems plausible.

  6. gavinandresen commented at 9:07 PM on February 1, 2013: contributor

    I take back my ACK: this breaks unit tests. TestingSetup() in test/test_bitcoin.cpp needs to call InitBlockIndex, I think.

  7. Make sure the genesis block is present after reindex 386037615a
  8. sipa commented at 10:33 PM on February 1, 2013: member

    Fixed.

  9. BitcoinPullTester commented at 3:05 PM on February 5, 2013: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/386037615ae02f972287a958d22a5bd2760626a7 for binaries and test log.

  10. gavinandresen merged this on Feb 5, 2013
  11. gavinandresen closed this on Feb 5, 2013

  12. sipa deleted the branch on May 3, 2013
  13. DrahtBot locked this on Sep 8, 2021

Milestone
0.8.0


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-19 09:16 UTC

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