mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-07-31 20:11:23 +00:00
Give regtest a payment protocol ID too.
This commit is contained in:
@@ -64,6 +64,7 @@ public abstract class NetworkParameters implements Serializable {
|
|||||||
public static final String PAYMENT_PROTOCOL_ID_TESTNET = "test";
|
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). */
|
/** 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";
|
public static final String PAYMENT_PROTOCOL_ID_UNIT_TESTS = "unittest";
|
||||||
|
public static final String PAYMENT_PROTOCOL_ID_REGTEST = "regtest";
|
||||||
|
|
||||||
// TODO: Seed nodes should be here as well.
|
// TODO: Seed nodes should be here as well.
|
||||||
|
|
||||||
@@ -228,6 +229,8 @@ public abstract class NetworkParameters implements Serializable {
|
|||||||
return TestNet3Params.get();
|
return TestNet3Params.get();
|
||||||
} else if (pmtProtocolId.equals(PAYMENT_PROTOCOL_ID_UNIT_TESTS)) {
|
} else if (pmtProtocolId.equals(PAYMENT_PROTOCOL_ID_UNIT_TESTS)) {
|
||||||
return UnitTestParams.get();
|
return UnitTestParams.get();
|
||||||
|
} else if (pmtProtocolId.equals(PAYMENT_PROTOCOL_ID_REGTEST)) {
|
||||||
|
return RegTestParams.get();
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@@ -68,6 +68,6 @@ public class RegTestParams extends TestNet2Params {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPaymentProtocolId() {
|
public String getPaymentProtocolId() {
|
||||||
return null;
|
return PAYMENT_PROTOCOL_ID_REGTEST;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user