mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-01-30 23:02:15 +00:00
testnet3
This commit is contained in:
parent
78dedcc9ba
commit
232d2cd51d
@ -141,6 +141,30 @@ public class NetworkParameters implements Serializable {
|
||||
public static final int TARGET_SPACING = 10 * 60; // 10 minutes per block.
|
||||
public static final int INTERVAL = TARGET_TIMESPAN / TARGET_SPACING;
|
||||
|
||||
/** Sets up the given Networkparemets with testnet3 values. */
|
||||
private static NetworkParameters createTestNet3(NetworkParameters n) {
|
||||
// Genesis hash is 000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943
|
||||
n.proofOfWorkLimit = Utils.decodeCompactBits(0x1d00ffffL);
|
||||
n.packetMagic = 0x0b110907;
|
||||
n.port = 18333;
|
||||
n.addressHeader = 111;
|
||||
n.acceptableAddressCodes = new int[] { 111 };
|
||||
n.dumpedPrivateKeyHeader = 239;
|
||||
n.interval = INTERVAL;
|
||||
n.targetTimespan = TARGET_TIMESPAN;
|
||||
n.alertSigningKey = SATOSHI_KEY;
|
||||
n.genesisBlock = createGenesis(n);
|
||||
n.genesisBlock.setTime(1296688602L);
|
||||
n.genesisBlock.setDifficultyTarget(0x1d00ffffL);
|
||||
n.genesisBlock.setNonce(414098458);
|
||||
n.setSpendableCoinbaseDepth(100);
|
||||
n.id = ID_TESTNET;
|
||||
String genesisHash = n.genesisBlock.getHashAsString();
|
||||
checkState(genesisHash.equals("000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943"),
|
||||
genesisHash);
|
||||
return n;
|
||||
}
|
||||
|
||||
/** Sets up the given NetworkParameters with testnet values. */
|
||||
private static NetworkParameters createTestNet(NetworkParameters n) {
|
||||
// Genesis hash is 0000000224b1593e3ff16a0e3b61285bbc393a39f78c8aa48c456142671f7110
|
||||
@ -171,6 +195,12 @@ public class NetworkParameters implements Serializable {
|
||||
return createTestNet(n);
|
||||
}
|
||||
|
||||
/** The testnet3 chain created by Gavin, included in Bitcoin 0.7. */
|
||||
public static NetworkParameters testNet3() {
|
||||
NetworkParameters n = new NetworkParameters();
|
||||
return createTestNet3(n);
|
||||
}
|
||||
|
||||
/** The primary BitCoin chain created by Satoshi. */
|
||||
public static NetworkParameters prodNet() {
|
||||
NetworkParameters n = new NetworkParameters();
|
||||
|
@ -48,7 +48,7 @@ public class IrcDiscovery implements PeerDiscovery {
|
||||
* Finds a list of peers by connecting to an IRC network, joining a channel, decoding the nicks and then
|
||||
* disconnecting.
|
||||
*
|
||||
* @param channel The IRC channel to join, either "#bitcoin" or "#bitcoinTEST" for the production and test networks
|
||||
* @param channel The IRC channel to join, either "#bitcoin" or "#bitcoinTEST3" for the production and test networks
|
||||
* respectively.
|
||||
*/
|
||||
public IrcDiscovery(String channel) {
|
||||
@ -60,7 +60,7 @@ public class IrcDiscovery implements PeerDiscovery {
|
||||
* disconnecting.
|
||||
*
|
||||
* @param server Name or textual IP address of the IRC server to join.
|
||||
* @param channel The IRC channel to join, either "#bitcoin" or "#bitcoinTEST" for the production and test networks
|
||||
* @param channel The IRC channel to join, either "#bitcoin" or "#bitcoinTEST3" for the production and test networks
|
||||
*/
|
||||
public IrcDiscovery(String channel, String server, int port) {
|
||||
this.channel = channel;
|
||||
|
Loading…
Reference in New Issue
Block a user