diff --git a/core/src/main/java/org/bitcoinj/core/CheckpointManager.java b/core/src/main/java/org/bitcoinj/core/CheckpointManager.java
index 07c50fb8b..93b840e51 100644
--- a/core/src/main/java/org/bitcoinj/core/CheckpointManager.java
+++ b/core/src/main/java/org/bitcoinj/core/CheckpointManager.java
@@ -76,7 +76,7 @@ public class CheckpointManager {
private static final String TEXTUAL_MAGIC = "TXT CHECKPOINTS 1";
private static final int MAX_SIGNATURES = 256;
- // Map of block header time to data.
+ // Map of block header time (in seconds) to data.
protected final TreeMap
Note that time is adjusted backwards by a week to account for possible clock drift in the block headers.
+ *Note that timeSecs is adjusted backwards by a week to account for possible clock drift in the block headers.
*/ - public static void checkpoint(NetworkParameters params, InputStream checkpoints, BlockStore store, long time) + public static void checkpoint(NetworkParameters params, InputStream checkpoints, BlockStore store, long timeSecs) throws IOException, BlockStoreException { checkNotNull(params); checkNotNull(store); checkArgument(!(store instanceof FullPrunedBlockStore), "You cannot use checkpointing with a full store."); - time -= 86400 * 7; + timeSecs -= 60 * 60 * 24 * 7; // one week in seconds - checkArgument(time > 0); - log.info("Attempting to initialize a new block store with a checkpoint for time {} ({})", time, Utils.dateTimeFormat(time * 1000)); + checkArgument(timeSecs > 0); + log.info("Attempting to initialize a new block store with a checkpoint for time {} ({})", timeSecs, + Utils.dateTimeFormat(timeSecs * 1000)); BufferedInputStream stream = new BufferedInputStream(checkpoints); CheckpointManager manager = new CheckpointManager(params, stream); - StoredBlock checkpoint = manager.getCheckpointBefore(time); + StoredBlock checkpoint = manager.getCheckpointBefore(timeSecs); store.put(checkpoint); store.setChainHead(checkpoint); }