Handle no chain tip available in InvalidChainFound() #6377

pull rnicoll wants to merge 1 commits into bitcoin:master from rnicoll:invalid-chain-found changing 1 files +4 −2
  1. rnicoll commented at 7:49 PM on July 4, 2015: contributor

    Handle the case where no chain tip is available, in InvalidChainFound(). This fixes a null pointer deference when running unit tests, if the genesis block or block validation code is broken.

  2. laanwj commented at 10:00 AM on July 21, 2015: member

    The initialization takes care that the node will not be started as long as the chain tip is NULL (see #5243). So this is not a case that should happen.

    Maybe add an assert(tip) instead?

  3. laanwj added the label Tests on Jul 21, 2015
  4. Handle no chain tip available in InvalidChainFound()
    Handle the case where no chain tip is available, in InvalidChainFound(). This fixes a null pointer deference when running unit tests, if the genesis block or block validation code is broken.
    c433828df9
  5. rnicoll force-pushed on Jul 22, 2015
  6. rnicoll commented at 9:11 PM on July 22, 2015: contributor

    Done - it still core dumps, but it's clear about where the failure was, at least (i.e. you don't have to dig out gdb to trace down what went wrong).

  7. laanwj commented at 3:55 PM on July 23, 2015: member

    Well it is meant to be fatal if it gets there with a NULL chaintip. Dumping core on abort() is a feature, not a bug. utACK

  8. laanwj merged this on Aug 7, 2015
  9. laanwj closed this on Aug 7, 2015

  10. laanwj referenced this in commit e545371b77 on Aug 7, 2015
  11. rnicoll deleted the branch on Mar 13, 2018
  12. DrahtBot locked this on Sep 8, 2021
Contributors
Labels

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

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