Change base networks from btc to xmr, e.g. BTC_REGTEST -> XMR_STAGENET (#55)

change base networks from btc to xmr, e.g. BTC_REGTEST -> XMR_STAGENET

add xmr seed node files
This commit is contained in:
woodser 2021-05-08 13:57:32 -04:00 committed by GitHub
parent de5bbf4a85
commit 9903821b18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
62 changed files with 353 additions and 181 deletions

View file

@ -108,7 +108,7 @@ public class Version {
return p2pMessageVersion;
}
// The version for the crypto network (BTC_Mainnet = 0, BTC_TestNet = 1, BTC_Regtest = 2, ...)
// The version for the crypto network (XMR_Mainnet = 0, XMR_Testnet = 1, XMR_Regtest = 2, ...)
private static int BASE_CURRENCY_NETWORK;
public static void setBaseCryptoNetworkId(int baseCryptoNetworkId) {

View file

@ -25,12 +25,12 @@ import org.bitcoinj.params.TestNet3Params;
import lombok.Getter;
public enum BaseCurrencyNetwork {
BTC_MAINNET(MainNetParams.get(), "BTC", "MAINNET", "Bitcoin"),
BTC_TESTNET(TestNet3Params.get(), "BTC", "TESTNET", "Bitcoin"),
BTC_REGTEST(RegTestParams.get(), "BTC", "REGTEST", "Bitcoin"),
BTC_DAO_TESTNET(RegTestParams.get(), "BTC", "REGTEST", "Bitcoin"), // server side regtest until v0.9.5
BTC_DAO_BETANET(MainNetParams.get(), "BTC", "MAINNET", "Bitcoin"), // mainnet test genesis
BTC_DAO_REGTEST(RegTestParams.get(), "BTC", "REGTEST", "Bitcoin"); // server side regtest after v0.9.5, had breaking code changes so we started over again
XMR_MAINNET(MainNetParams.get(), "XMR", "MAINNET", "Monero"),
XMR_TESTNET(TestNet3Params.get(), "XMR", "TESTNET", "Monero"),
XMR_STAGENET(RegTestParams.get(), "XMR", "STAGENET", "Monero"),
BTC_DAO_TESTNET(RegTestParams.get(), "XMR", "STAGENET", "Monero"),
BTC_DAO_BETANET(MainNetParams.get(), "XMR", "MAINNET", "Monero"), // mainnet test genesis
BTC_DAO_REGTEST(RegTestParams.get(), "XMR", "STAGENET", "Monero");
@Getter
private final NetworkParameters parameters;
@ -49,11 +49,11 @@ public enum BaseCurrencyNetwork {
}
public boolean isMainnet() {
return "BTC_MAINNET".equals(name());
return "XMR_MAINNET".equals(name());
}
public boolean isTestnet() {
return "BTC_TESTNET".equals(name());
return "XMR_TESTNET".equals(name());
}
public boolean isDaoTestNet() {
@ -68,8 +68,8 @@ public enum BaseCurrencyNetwork {
return "BTC_DAO_BETANET".equals(name());
}
public boolean isRegtest() {
return "BTC_REGTEST".equals(name());
public boolean isStagenet() {
return "XMR_STAGENET".equals(name());
}
public long getDefaultMinFeePerVbyte() {

View file

@ -136,7 +136,7 @@ public class Config {
// Static fields that provide access to Config properties in locations where injecting
// a Config instance is not feasible. See Javadoc for corresponding static accessors.
private static File APP_DATA_DIR_VALUE;
private static BaseCurrencyNetwork BASE_CURRENCY_NETWORK_VALUE = BaseCurrencyNetwork.BTC_MAINNET;
private static BaseCurrencyNetwork BASE_CURRENCY_NETWORK_VALUE = BaseCurrencyNetwork.XMR_MAINNET;
// Default "data dir properties", i.e. properties that can determine the location of
// Bisq's application data directory (appDataDir)
@ -338,7 +338,7 @@ public class Config {
.withRequiredArg()
.ofType(BaseCurrencyNetwork.class)
.withValuesConvertedBy(new EnumValueConverter(BaseCurrencyNetwork.class))
.defaultsTo(BaseCurrencyNetwork.BTC_MAINNET);
.defaultsTo(BaseCurrencyNetwork.XMR_MAINNET);
ArgumentAcceptingOptionSpec<Boolean> ignoreLocalBtcNodeOpt =
parser.accepts(IGNORE_LOCAL_BTC_NODE,
@ -348,7 +348,7 @@ public class Config {
.defaultsTo(false);
ArgumentAcceptingOptionSpec<String> bitcoinRegtestHostOpt =
parser.accepts(BITCOIN_REGTEST_HOST, "Bitcoin Core node when using BTC_REGTEST network")
parser.accepts(BITCOIN_REGTEST_HOST, "Bitcoin Core node when using XMR_STAGENET network")
.withRequiredArg()
.ofType(String.class)
.describedAs("host[:port]")
@ -416,7 +416,7 @@ public class Config {
.describedAs("host:port[,...]");
ArgumentAcceptingOptionSpec<Boolean> useLocalhostForP2POpt =
parser.accepts(USE_LOCALHOST_FOR_P2P, "Use localhost P2P network for development. Only available for non-BTC_MAINNET configuration.")
parser.accepts(USE_LOCALHOST_FOR_P2P, "Use localhost P2P network for development. Only available for non-XMR_MAINNET configuration.")
.availableIf(BASE_CURRENCY_NETWORK)
.withRequiredArg()
.ofType(boolean.class)
@ -919,7 +919,7 @@ public class Config {
/**
* Static accessor that returns either the default base currency network value of
* {@link BaseCurrencyNetwork#BTC_MAINNET} or the value assigned via the
* {@link BaseCurrencyNetwork#XMR_MAINNET} or the value assigned via the
* {@value BASE_CURRENCY_NETWORK} option. The non-static
* {@link #baseCurrencyNetwork} property should be favored whenever possible and
* this static accessor should be used only in code locations where it is infeasible