コード例 #1
0
 /**
  * Returns the network parameters for the given string paymentProtocolID or NULL if not
  * recognized.
  */
 @Nullable
 public static NetworkParameters fromPmtProtocolID(String pmtProtocolId) {
   if (pmtProtocolId.equals(PAYMENT_PROTOCOL_ID_MAINNET)) {
     return MainNetParams.get();
   } else if (pmtProtocolId.equals(PAYMENT_PROTOCOL_ID_TESTNET)) {
     return TestNet3Params.get();
   } else {
     return null;
   }
 }
コード例 #2
0
 /** Returns the network parameters for the given string ID or NULL if not recognized. */
 @Nullable
 public static NetworkParameters fromID(String id) {
   if (id.equals(ID_MAINNET)) {
     return MainNetParams.get();
   } else if (id.equals(ID_TESTNET)) {
     return TestNet3Params.get();
   } else if (id.equals(ID_UNITTESTNET)) {
     return UnitTestParams.get();
   } else {
     return null;
   }
 }
コード例 #3
0
 /** Alias for TestNet3Params.get(), use that instead. */
 @Deprecated
 public static NetworkParameters testNet3() {
   return TestNet3Params.get();
 }