mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-07-30 19:41:24 +00:00
Give unit test params a payment protocol ID.
This commit is contained in:
@@ -62,6 +62,8 @@ public abstract class NetworkParameters implements Serializable {
|
||||
public static final String PAYMENT_PROTOCOL_ID_MAINNET = "main";
|
||||
/** The string used by the payment protocol to represent the test net. */
|
||||
public static final String PAYMENT_PROTOCOL_ID_TESTNET = "test";
|
||||
/** The string used by the payment protocol to represent unit testing (note that this is non-standard). */
|
||||
public static final String PAYMENT_PROTOCOL_ID_UNIT_TESTS = "unittest";
|
||||
|
||||
// TODO: Seed nodes should be here as well.
|
||||
|
||||
@@ -224,6 +226,8 @@ public abstract class NetworkParameters implements Serializable {
|
||||
return MainNetParams.get();
|
||||
} else if (pmtProtocolId.equals(PAYMENT_PROTOCOL_ID_TESTNET)) {
|
||||
return TestNet3Params.get();
|
||||
} else if (pmtProtocolId.equals(PAYMENT_PROTOCOL_ID_UNIT_TESTS)) {
|
||||
return UnitTestParams.get();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
@@ -58,6 +58,6 @@ public class UnitTestParams extends NetworkParameters {
|
||||
|
||||
@Override
|
||||
public String getPaymentProtocolId() {
|
||||
return null;
|
||||
return "unittest";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user