mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-12 10:15:52 +00:00
Give regtest mode its own ID so wallets don't get mixed up between regtest and testnet.
This commit is contained in:
parent
9680911bca
commit
32360fea8d
@ -54,6 +54,8 @@ public abstract class NetworkParameters implements Serializable {
|
||||
public static final String ID_MAINNET = "org.bitcoin.production";
|
||||
/** The string returned by getId() for the testnet. */
|
||||
public static final String ID_TESTNET = "org.bitcoin.test";
|
||||
/** The string returned by getId() for regtest mode. */
|
||||
public static final String ID_REGTEST = "org.bitcoin.regtest";
|
||||
/** Unit test network. */
|
||||
public static final String ID_UNITTESTNET = "com.google.bitcoin.unittest";
|
||||
|
||||
@ -207,6 +209,8 @@ public abstract class NetworkParameters implements Serializable {
|
||||
return TestNet3Params.get();
|
||||
} else if (id.equals(ID_UNITTESTNET)) {
|
||||
return UnitTestParams.get();
|
||||
} else if (id.equals(ID_REGTEST)) {
|
||||
return RegTestParams.get();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
@ -34,6 +34,7 @@ public class RegTestParams extends TestNet2Params {
|
||||
maxTarget = MAX_TARGET;
|
||||
subsidyDecreaseBlockCount = 150;
|
||||
port = 18444;
|
||||
id = ID_REGTEST;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user