File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -2073,7 +2073,7 @@ static CBlockIndex* FindMostWorkChain() {
2073
2073
CBlockIndex *pindexTest = pindexNew;
2074
2074
bool fInvalidAncestor = false ;
2075
2075
while (pindexTest && !chainActive.Contains (pindexTest)) {
2076
- if (! pindexTest->IsValid (BLOCK_VALID_TRANSACTIONS) || !(pindexTest-> nStatus & BLOCK_HAVE_DATA) ) {
2076
+ if (pindexTest->nStatus & BLOCK_FAILED_MASK ) {
2077
2077
// Candidate has an invalid ancestor, remove entire chain from the set.
2078
2078
if (pindexBestInvalid == NULL || pindexNew->nChainWork > pindexBestInvalid->nChainWork )
2079
2079
pindexBestInvalid = pindexNew;
@@ -2083,6 +2083,7 @@ static CBlockIndex* FindMostWorkChain() {
2083
2083
setBlockIndexValid.erase (pindexFailed);
2084
2084
pindexFailed = pindexFailed->pprev ;
2085
2085
}
2086
+ setBlockIndexValid.erase (pindexTest);
2086
2087
fInvalidAncestor = true ;
2087
2088
break ;
2088
2089
}
You can’t perform that action at this time.
0 commit comments