From 3ac651c0a4fc0bcc6c6789ecc685110c25b9f6d0 Mon Sep 17 00:00:00 2001 From: hvarona Date: Mon, 19 Nov 2018 22:25:34 -0400 Subject: [PATCH] change to testnet --- .../agorise/crystalwallet/application/CrystalApplication.java | 3 ++- .../main/java/cy/agorise/crystalwallet/enums/CryptoCoin.java | 2 +- .../crystalwallet/network/BitcoinCryptoNetVerifier.java | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/cy/agorise/crystalwallet/application/CrystalApplication.java b/app/src/main/java/cy/agorise/crystalwallet/application/CrystalApplication.java index 9e78385..5240ea1 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/application/CrystalApplication.java +++ b/app/src/main/java/cy/agorise/crystalwallet/application/CrystalApplication.java @@ -52,7 +52,8 @@ public class CrystalApplication extends Application { public static final String BITCOIN_SERVER_URLS[] ={ - "https://insight.bitpay.com/" + "https://insight.bitpay.com/", + "https://testnet.blockexplorer.com/" }; public static final CryptoCurrency BITCOIN_CURRENCY = new CryptoCurrency("BTC",CryptoNet.BITCOIN,8); diff --git a/app/src/main/java/cy/agorise/crystalwallet/enums/CryptoCoin.java b/app/src/main/java/cy/agorise/crystalwallet/enums/CryptoCoin.java index e7bed2a..328f8a4 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/enums/CryptoCoin.java +++ b/app/src/main/java/cy/agorise/crystalwallet/enums/CryptoCoin.java @@ -13,7 +13,7 @@ import java.util.List; */ public enum CryptoCoin implements Serializable { - BITCOIN(CryptoNet.BITCOIN,"BTC",8,0,NetworkParameters.fromID(NetworkParameters.ID_MAINNET)), + BITCOIN(CryptoNet.BITCOIN,"BTC",8,0,NetworkParameters.fromID(NetworkParameters.ID_TESTNET)), BITCOIN_TEST(CryptoNet.BITCOIN_TEST,"BTC",8,1,NetworkParameters.fromID(NetworkParameters.ID_TESTNET)), LITECOIN(CryptoNet.LITECOIN,"LTC",8,2,null), DASH(CryptoNet.DASH,"DASH",8,5,null), diff --git a/app/src/main/java/cy/agorise/crystalwallet/network/BitcoinCryptoNetVerifier.java b/app/src/main/java/cy/agorise/crystalwallet/network/BitcoinCryptoNetVerifier.java index f29ea0d..d38bcfb 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/network/BitcoinCryptoNetVerifier.java +++ b/app/src/main/java/cy/agorise/crystalwallet/network/BitcoinCryptoNetVerifier.java @@ -22,6 +22,8 @@ public class BitcoinCryptoNetVerifier extends CryptoNetVerifier{ if(value.equals(cryptoCoin.getParameters().getGenesisBlock().getHashAsString())){ CryptoNetManager.verifiedCryptoNetURL(cryptoCoin.getCryptoNet(), url, System.currentTimeMillis() - startTime); + }else{ + System.out.println("BitcoinCryptoNetVerifier bad genesis block " + value); } //TODO bad genesis block }else{