3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-14 19:25:51 +00:00

Use RegTestParams.get()

This commit is contained in:
Mike Hearn 2013-06-12 11:11:48 +02:00
parent 80b66a8945
commit 20049fb9f8
2 changed files with 9 additions and 1 deletions

View File

@ -58,4 +58,12 @@ public class RegTestParams extends TestNet2Params {
return genesis;
}
}
private static RegTestParams instance;
public static synchronized RegTestParams get() {
if (instance == null) {
instance = new RegTestParams();
}
return instance;
}
}

View File

@ -49,7 +49,7 @@ public class BitcoindComparisonTool {
System.out.println("USAGE: bitcoinjBlockStoreLocation runLargeReorgs(1/0) [port=18444]");
boolean runLargeReorgs = args.length > 1 && Integer.parseInt(args[1]) == 1;
params = new RegTestParams();
params = RegTestParams.get();
File blockFile = File.createTempFile("testBlocks", ".dat");
blockFile.deleteOnExit();