mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-03-10 17:26:28 +01:00
Support ID based construction of unit test network params. Fixes an issue in the serializer tests.
This commit is contained in:
parent
068db43569
commit
29727113a5
1 changed files with 6 additions and 6 deletions
|
@ -48,14 +48,12 @@ public class NetworkParameters implements Serializable {
|
|||
*/
|
||||
public static final byte[] SATOSHI_KEY = Hex.decode("04fc9702847840aaf195de8442ebecedf5b095cdbb9bc716bda9110971b28a49e0ead8564ff0db22209e0374782c093bb899692d524e9d6a6956e7c5ecbcd68284");
|
||||
|
||||
/**
|
||||
* The string returned by getId() for the main, production network where people trade things.
|
||||
*/
|
||||
/** The string returned by getId() for the main, production network where people trade things. */
|
||||
public static final String ID_PRODNET = "org.bitcoin.production";
|
||||
/**
|
||||
* The string returned by getId() for the testnet.
|
||||
*/
|
||||
/** The string returned by getId() for the testnet. */
|
||||
public static final String ID_TESTNET = "org.bitcoin.test";
|
||||
/** Unit test network. */
|
||||
static final String ID_UNITTESTNET = "com.google.bitcoin.unittest";
|
||||
|
||||
// TODO: Seed nodes should be here as well.
|
||||
|
||||
|
@ -320,6 +318,8 @@ public class NetworkParameters implements Serializable {
|
|||
return prodNet();
|
||||
} else if (id.equals(ID_TESTNET)) {
|
||||
return testNet();
|
||||
} else if (id.equals(ID_UNITTESTNET)) {
|
||||
return unitTests();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue