Browse Source

Add a "testnet-" prefix in filenames when creating or importing bootstraps on testnet, so that the two databases can be kept separate.

v2.0-beta
CalDescent 3 years ago
parent
commit
889f6fc5fc
  1. 8
      src/main/java/org/qortal/repository/Bootstrap.java

8
src/main/java/org/qortal/repository/Bootstrap.java

@ -344,15 +344,17 @@ public class Bootstrap {
private String getFilename() { private String getFilename() {
boolean isTopOnly = Settings.getInstance().isTopOnly(); boolean isTopOnly = Settings.getInstance().isTopOnly();
boolean archiveEnabled = Settings.getInstance().isArchiveEnabled(); boolean archiveEnabled = Settings.getInstance().isArchiveEnabled();
boolean isTestnet = Settings.getInstance().isTestNet();
String prefix = isTestnet ? "testnet-" : "";
if (isTopOnly) { if (isTopOnly) {
return "bootstrap-toponly.7z"; return prefix.concat("bootstrap-toponly.7z");
} }
else if (archiveEnabled) { else if (archiveEnabled) {
return "bootstrap-archive.7z"; return prefix.concat("bootstrap-archive.7z");
} }
else { else {
return "bootstrap-full.7z"; return prefix.concat("bootstrap-full.7z");
} }
} }

Loading…
Cancel
Save