3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-01-31 07:12:17 +00:00

Add testnet checkpoints for WalletTemplate.

This commit is contained in:
Mike Hearn 2014-08-25 17:43:25 +02:00
parent 0f48c902d2
commit 3ec6d30562
2 changed files with 5 additions and 2 deletions

View File

@ -4,6 +4,7 @@ import com.google.bitcoin.core.NetworkParameters;
import com.google.bitcoin.kits.WalletAppKit;
import com.google.bitcoin.params.MainNetParams;
import com.google.bitcoin.params.RegTestParams;
import com.google.bitcoin.params.TestNet3Params;
import com.google.bitcoin.utils.BriefLogFormatter;
import com.google.bitcoin.utils.Threading;
import com.google.bitcoin.wallet.DeterministicSeed;
@ -29,7 +30,7 @@ import static wallettemplate.utils.GuiUtils.*;
public class Main extends Application {
public static String APP_NAME = "WalletTemplate";
public static NetworkParameters params = MainNetParams.get();
public static NetworkParameters params = TestNet3Params.get();
public static WalletAppKit bitcoin;
public static Main instance;
@ -123,7 +124,9 @@ public class Main extends Application {
// last months worth or more (takes a few seconds).
bitcoin.setCheckpoints(getClass().getResourceAsStream("checkpoints"));
// As an example!
bitcoin.useTor();
// bitcoin.useTor();
} else if (params == TestNet3Params.get()) {
bitcoin.setCheckpoints(getClass().getResourceAsStream("checkpoints.testnet"));
}
bitcoin.setDownloadListener(controller.progressBarUpdater())
.setBlockingStartup(false)