3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-11 17:55:53 +00:00

Give regtest a payment protocol ID too.

This commit is contained in:
Mike Hearn 2015-01-08 18:35:11 +01:00
parent e09e383007
commit 57bbb9152b
2 changed files with 4 additions and 1 deletions

View File

@ -64,6 +64,7 @@ public abstract class NetworkParameters implements Serializable {
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";
public static final String PAYMENT_PROTOCOL_ID_REGTEST = "regtest";
// TODO: Seed nodes should be here as well.
@ -228,6 +229,8 @@ public abstract class NetworkParameters implements Serializable {
return TestNet3Params.get();
} else if (pmtProtocolId.equals(PAYMENT_PROTOCOL_ID_UNIT_TESTS)) {
return UnitTestParams.get();
} else if (pmtProtocolId.equals(PAYMENT_PROTOCOL_ID_REGTEST)) {
return RegTestParams.get();
} else {
return null;
}

View File

@ -68,6 +68,6 @@ public class RegTestParams extends TestNet2Params {
@Override
public String getPaymentProtocolId() {
return null;
return PAYMENT_PROTOCOL_ID_REGTEST;
}
}