mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-01-31 15:22:16 +00:00
Update checkpoint sanity for mainnet and testnet.
This commit is contained in:
parent
0ff1ce73a7
commit
2df74e97dc
@ -91,9 +91,18 @@ public class BuildCheckpoints {
|
|||||||
// Sanity check the created file.
|
// Sanity check the created file.
|
||||||
CheckpointManager manager = new CheckpointManager(PARAMS, new FileInputStream(CHECKPOINTS_FILE));
|
CheckpointManager manager = new CheckpointManager(PARAMS, new FileInputStream(CHECKPOINTS_FILE));
|
||||||
checkState(manager.numCheckpoints() == checkpoints.size());
|
checkState(manager.numCheckpoints() == checkpoints.size());
|
||||||
StoredBlock test = manager.getCheckpointBefore(1348310800); // Just after block 200,000
|
|
||||||
checkState(test.getHeight() == 199584);
|
if (PARAMS.getId() == NetworkParameters.ID_MAINNET) {
|
||||||
checkState(test.getHeader().getHashAsString().equals("000000000000002e00a243fe9aa49c78f573091d17372c2ae0ae5e0f24f55b52"));
|
StoredBlock test = manager.getCheckpointBefore(1390500000); // Thu Jan 23 19:00:00 CET 2014
|
||||||
|
checkState(test.getHeight() == 280224);
|
||||||
|
checkState(test.getHeader().getHashAsString()
|
||||||
|
.equals("00000000000000000b5d59a15f831e1c45cb688a4db6b0a60054d49a9997fa34"));
|
||||||
|
} else if (PARAMS.getId() == NetworkParameters.ID_TESTNET) {
|
||||||
|
StoredBlock test = manager.getCheckpointBefore(1390500000); // Thu Jan 23 19:00:00 CET 2014
|
||||||
|
checkState(test.getHeight() == 167328);
|
||||||
|
checkState(test.getHeader().getHashAsString()
|
||||||
|
.equals("0000000000035ae7d5025c2538067fe7adb1cf5d5d9c31b024137d9090ed13a9"));
|
||||||
|
}
|
||||||
|
|
||||||
System.out.println("Checkpoints written to '" + CHECKPOINTS_FILE.getCanonicalPath() + "'.");
|
System.out.println("Checkpoints written to '" + CHECKPOINTS_FILE.getCanonicalPath() + "'.");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user