From ce5bc80347f686c822defc67c30c8cf512ca2df7 Mon Sep 17 00:00:00 2001 From: CalDescent Date: Tue, 28 Sep 2021 20:21:19 +0100 Subject: [PATCH] Increased threshold of BlockArchiveWriter.isArchiverUpToDate() from 90 to 95%. In practice, the reading from a correctly archived chain with 550k blocks is currently around 99.5%, but it will be lower if starting with a chain that isn't fully synced. --- src/main/java/org/qortal/repository/BlockArchiveWriter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/qortal/repository/BlockArchiveWriter.java b/src/main/java/org/qortal/repository/BlockArchiveWriter.java index 77c98d96..36760a2d 100644 --- a/src/main/java/org/qortal/repository/BlockArchiveWriter.java +++ b/src/main/java/org/qortal/repository/BlockArchiveWriter.java @@ -60,10 +60,10 @@ public class BlockArchiveWriter { LOGGER.info(String.format("maxArchiveHeight: %d, actualArchiveHeight: %d, progress: %f", maxArchiveHeight, actualArchiveHeight, progress)); - // If archiver is within 90% of the maximum, treat it as up to date + // If archiver is within 95% of the maximum, treat it as up to date // We need several percent as an allowance because the archiver will only // save files when they reach the target size - return (progress >= 0.90); + return (progress >= 0.95); } public BlockArchiveWriteResult write() throws DataException, IOException, TransformationException, InterruptedException {