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"; 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;
} }

View File

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