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.
This commit is contained in:
CalDescent 2021-09-28 20:21:19 +01:00
parent 0a4479fe9e
commit ce5bc80347

View File

@ -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 {