diff --git a/src/validation.cpp b/src/validation.cpp --- a/src/validation.cpp +++ b/src/validation.cpp @@ -5019,18 +5019,6 @@ } } - // Reduce validity flag and have-data flags. - // We do this after actual disconnecting, otherwise we'll end up writing the - // lack of data to disk before writing the chainstate, resulting in a - // failure to continue if interrupted. - for (const auto &entry : mapBlockIndex) { - CBlockIndex *pindexIter = entry.second; - if (pindexIter->IsValid(BlockValidity::TRANSACTIONS) && - pindexIter->HaveTxsDownloaded()) { - setBlockIndexCandidates.insert(pindexIter); - } - } - if (chainActive.Tip() != nullptr) { // We can't prune block index candidates based on our tip if we have // no tip due to chainActive being empty!