Fixed bug in earlier commit

This commit is contained in:
CalDescent 2021-10-03 16:09:52 +01:00
parent 52b322b756
commit 59c8e4e6a2

View File

@ -514,8 +514,10 @@ public class BlockChain {
// Ensure archive is (at least partially) intact, and force a bootstrap if it isn't // Ensure archive is (at least partially) intact, and force a bootstrap if it isn't
if (!isTopOnly && archiveEnabled && canBootstrap) { if (!isTopOnly && archiveEnabled && canBootstrap) {
needsArchiveRebuild = (repository.getBlockArchiveRepository().fromHeight(2) == null); needsArchiveRebuild = (repository.getBlockArchiveRepository().fromHeight(2) == null);
LOGGER.info("Couldn't retrieve block 2 from archive. Bootstrapping..."); if (needsArchiveRebuild) {
Controller.getInstance().exportRepositoryData(); LOGGER.info("Couldn't retrieve block 2 from archive. Bootstrapping...");
Controller.getInstance().exportRepositoryData();
}
} }
} }