From 4bdb8d78360b6f104a249d61e222588a44d27a13 Mon Sep 17 00:00:00 2001 From: Andreas Schildbach Date: Sun, 26 Mar 2023 17:55:47 +0200 Subject: [PATCH] CheckpointManager: fix wrong unit of time This mistake was introduced in commit 838b12c046d880d82296e076a25348482206ec74. The original line before the `java.time` migration was: `60 * 60 * 24 * 7; // one week in seconds` --- core/src/main/java/org/bitcoinj/core/CheckpointManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/bitcoinj/core/CheckpointManager.java b/core/src/main/java/org/bitcoinj/core/CheckpointManager.java index e9b5b0cbb..d200b2502 100644 --- a/core/src/main/java/org/bitcoinj/core/CheckpointManager.java +++ b/core/src/main/java/org/bitcoinj/core/CheckpointManager.java @@ -240,7 +240,7 @@ public class CheckpointManager { checkArgument(!(store instanceof FullPrunedBlockStore), () -> "you cannot use checkpointing with a full store"); - time = time.minus(7, ChronoUnit.WEEKS); + time = time.minus(7, ChronoUnit.DAYS); log.info("Attempting to initialize a new block store with a checkpoint for time {} ({})", time.getEpochSecond(), TimeUtils.dateTimeFormat(time));