change to testnet
This commit is contained in:
parent
dfca4b8c53
commit
3ac651c0a4
3 changed files with 5 additions and 2 deletions
|
@ -52,7 +52,8 @@ public class CrystalApplication extends Application {
|
||||||
|
|
||||||
|
|
||||||
public static final String BITCOIN_SERVER_URLS[] ={
|
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);
|
public static final CryptoCurrency BITCOIN_CURRENCY = new CryptoCurrency("BTC",CryptoNet.BITCOIN,8);
|
||||||
|
|
|
@ -13,7 +13,7 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public enum CryptoCoin implements Serializable {
|
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)),
|
BITCOIN_TEST(CryptoNet.BITCOIN_TEST,"BTC",8,1,NetworkParameters.fromID(NetworkParameters.ID_TESTNET)),
|
||||||
LITECOIN(CryptoNet.LITECOIN,"LTC",8,2,null),
|
LITECOIN(CryptoNet.LITECOIN,"LTC",8,2,null),
|
||||||
DASH(CryptoNet.DASH,"DASH",8,5,null),
|
DASH(CryptoNet.DASH,"DASH",8,5,null),
|
||||||
|
|
|
@ -22,6 +22,8 @@ public class BitcoinCryptoNetVerifier extends CryptoNetVerifier{
|
||||||
if(value.equals(cryptoCoin.getParameters().getGenesisBlock().getHashAsString())){
|
if(value.equals(cryptoCoin.getParameters().getGenesisBlock().getHashAsString())){
|
||||||
|
|
||||||
CryptoNetManager.verifiedCryptoNetURL(cryptoCoin.getCryptoNet(), url, System.currentTimeMillis() - startTime);
|
CryptoNetManager.verifiedCryptoNetURL(cryptoCoin.getCryptoNet(), url, System.currentTimeMillis() - startTime);
|
||||||
|
}else{
|
||||||
|
System.out.println("BitcoinCryptoNetVerifier bad genesis block " + value);
|
||||||
}
|
}
|
||||||
//TODO bad genesis block
|
//TODO bad genesis block
|
||||||
}else{
|
}else{
|
||||||
|
|
Loading…
Reference in a new issue