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.
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-
rnicoll commented at 7:49 PM on July 4, 2015: contributor
- laanwj added the label Tests on Jul 21, 2015
-
c433828df9
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.
- rnicoll force-pushed on Jul 22, 2015
-
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).
-
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
- laanwj merged this on Aug 7, 2015
- laanwj closed this on Aug 7, 2015
- laanwj referenced this in commit e545371b77 on Aug 7, 2015
- rnicoll deleted the branch on Mar 13, 2018
- DrahtBot locked this on Sep 8, 2021