mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-02-24 06:47:54 +01:00
CheckpointManager: Log time of latest checkpoint read.
This commit is contained in:
parent
edb2fa8959
commit
7d7ef1b494
1 changed files with 4 additions and 2 deletions
|
@ -142,7 +142,8 @@ public class CheckpointManager {
|
||||||
checkpoints.put(block.getHeader().getTimeSeconds(), block);
|
checkpoints.put(block.getHeader().getTimeSeconds(), block);
|
||||||
}
|
}
|
||||||
Sha256Hash dataHash = Sha256Hash.wrap(digest.digest());
|
Sha256Hash dataHash = Sha256Hash.wrap(digest.digest());
|
||||||
log.info("Read {} checkpoints, hash is {}", checkpoints.size(), dataHash);
|
log.info("Read {} checkpoints up to time {}, hash is {}", checkpoints.size(),
|
||||||
|
Utils.dateTimeFormat(checkpoints.lastEntry().getKey() * 1000), dataHash);
|
||||||
return dataHash;
|
return dataHash;
|
||||||
} catch (ProtocolException e) {
|
} catch (ProtocolException e) {
|
||||||
throw new IOException(e);
|
throw new IOException(e);
|
||||||
|
@ -179,7 +180,8 @@ public class CheckpointManager {
|
||||||
checkpoints.put(block.getHeader().getTimeSeconds(), block);
|
checkpoints.put(block.getHeader().getTimeSeconds(), block);
|
||||||
}
|
}
|
||||||
HashCode hash = hasher.hash();
|
HashCode hash = hasher.hash();
|
||||||
log.info("Read {} checkpoints, hash is {}", checkpoints.size(), hash);
|
log.info("Read {} checkpoints up to time {}, hash is {}", checkpoints.size(),
|
||||||
|
Utils.dateTimeFormat(checkpoints.lastEntry().getKey() * 1000), hash);
|
||||||
return Sha256Hash.wrap(hash.asBytes());
|
return Sha256Hash.wrap(hash.asBytes());
|
||||||
} finally {
|
} finally {
|
||||||
if (reader != null) reader.close();
|
if (reader != null) reader.close();
|
||||||
|
|
Loading…
Add table
Reference in a new issue