Handle no chain tip available in InvalidChainFound() - #6377
Merged
Conversation
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 |
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
the
invalid-chain-found
branch
from
July 22, 2015 21:10
f3a2655 to
c433828
Compare
Author
|
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). |
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. |
laanwj
added a commit
that referenced
this pull request
Aug 7, 2015
c433828 Handle no chain tip available in InvalidChainFound() (Ross Nicoll)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.