mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-11-02 05:27:17 +00:00
NetworkParameters: Refactor out into separate classes.
Hide fields behind getters and make unit tests create anonymous subclasses to tweak them rather than overwriting global variables. Introduce a regtest params class for use in the comparison tool. Conflicts: core/src/test/java/com/google/bitcoin/core/BitcoindComparisonTool.java core/src/test/java/com/google/bitcoin/core/FullPrunedBlockChainTest.java
This commit is contained in:
@@ -3,7 +3,6 @@ package com.google.bitcoin.tools;
|
||||
import com.google.bitcoin.core.*;
|
||||
import com.google.bitcoin.store.BlockStore;
|
||||
import com.google.bitcoin.store.MemoryBlockStore;
|
||||
import com.google.bitcoin.store.SPVBlockStore;
|
||||
import com.google.bitcoin.utils.BriefLogFormatter;
|
||||
|
||||
import java.io.*;
|
||||
@@ -43,7 +42,7 @@ public class BuildCheckpoints {
|
||||
@Override
|
||||
public void notifyNewBestBlock(StoredBlock block) throws VerificationException {
|
||||
int height = block.getHeight();
|
||||
if (height % params.interval == 0 && block.getHeader().getTimeSeconds() <= oneMonthAgo) {
|
||||
if (height % params.getInterval() == 0 && block.getHeader().getTimeSeconds() <= oneMonthAgo) {
|
||||
System.out.println(String.format("Checkpointing block %s at height %d",
|
||||
block.getHeader().getHash(), block.getHeight()));
|
||||
checkpoints.put(height, block);
|
||||
|
||||
Reference in New Issue
Block a user