diff --git a/src/node/blockstorage.cpp b/src/node/blockstorage.cpp index ecc061a7d98..47a7d656a8f 100644 --- a/src/node/blockstorage.cpp +++ b/src/node/blockstorage.cpp @@ -464,7 +464,8 @@ bool BlockManager::LoadBlockIndex(const std::optional& snapshot_blockha } } if (!(pindex->nStatus & BLOCK_FAILED_VALID) && pindex->pprev && (pindex->pprev->nStatus & BLOCK_FAILED_VALID)) { - pindex->nStatus |= BLOCK_FAILED_VALID; + // BLOCK_FAILED_CHILD is deprecated, but may still exist on disk. Replace it with BLOCK_FAILED_VALID. + pindex->nStatus = (pindex->nStatus & ~BLOCK_FAILED_CHILD) | BLOCK_FAILED_VALID; m_dirty_blockindex.insert(pindex); } if (pindex->pprev) {