aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
diff options
context:
space:
mode:
authorJames O'Beirne <james.obeirne@pm.me>2021-07-21 14:13:33 -0400
committerJames O'Beirne <james.obeirne@pm.me>2021-09-15 15:46:46 -0400
commit5a807736dacfc3e6fa57231219336acf08be38fb (patch)
tree75033e48de3138a4b97a0214d5491cd7104541fb /src/validation.cpp
parent01a9b8fe719efab2c268dc738bc93cfbdf92edb7 (diff)
validation: insert assumed-valid block index entries into candidates
Diffstat (limited to 'src/validation.cpp')
-rw-r--r--src/validation.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index d34f4d636c..fc498f6e9b 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -3773,7 +3773,9 @@ bool BlockManager::LoadBlockIndex(
pindex->nStatus |= BLOCK_FAILED_CHILD;
setDirtyBlockIndex.insert(pindex);
}
- if (pindex->IsValid(BLOCK_VALID_TRANSACTIONS) && (pindex->HaveTxsDownloaded() || pindex->pprev == nullptr)) {
+ if (pindex->IsAssumedValid() ||
+ (pindex->IsValid(BLOCK_VALID_TRANSACTIONS) &&
+ (pindex->HaveTxsDownloaded() || pindex->pprev == nullptr))) {
block_index_candidates.insert(pindex);
}
if (pindex->nStatus & BLOCK_FAILED_MASK && (!pindexBestInvalid || pindex->nChainWork > pindexBestInvalid->nChainWork))