Run the bulk block archiver any time that it isn't reported to be up to date. This should allow it to re-run if the user quits the core before it completes.

This commit is contained in:
CalDescent 2021-10-03 15:17:31 +01:00
parent b00c1c1575
commit f09fb5a209

View File

@ -33,9 +33,9 @@ public class HSQLDBDatabaseArchiving {
public static boolean buildBlockArchive(Repository repository, long fileSizeTarget) throws DataException { public static boolean buildBlockArchive(Repository repository, long fileSizeTarget) throws DataException {
// Only build the archive if we have never done so before // Only build the archive if we haven't already got one that is up to date
int archiveHeight = repository.getBlockArchiveRepository().getBlockArchiveHeight(); boolean upToDate = BlockArchiveWriter.isArchiverUpToDate(repository);
if (archiveHeight > 0) { if (upToDate) {
// Already archived // Already archived
return false; return false;
} }