diff --git a/src/main/java/org/qortal/controller/Controller.java b/src/main/java/org/qortal/controller/Controller.java index 805e86c5..4002cd4c 100644 --- a/src/main/java/org/qortal/controller/Controller.java +++ b/src/main/java/org/qortal/controller/Controller.java @@ -438,10 +438,12 @@ public class Controller extends Thread { return; // Not System.exit() so that GUI can display error } - // Rebuild Names table and check database integrity + // Rebuild Names table and check database integrity (if enabled) NamesDatabaseIntegrityCheck namesDatabaseIntegrityCheck = new NamesDatabaseIntegrityCheck(); namesDatabaseIntegrityCheck.rebuildAllNames(); - namesDatabaseIntegrityCheck.runIntegrityCheck(); + if (Settings.getInstance().isNamesIntegrityCheckEnabled()) { + namesDatabaseIntegrityCheck.runIntegrityCheck(); + } LOGGER.info("Validating blockchain"); try { diff --git a/src/main/java/org/qortal/settings/Settings.java b/src/main/java/org/qortal/settings/Settings.java index 9bd01bb5..5f7698b3 100644 --- a/src/main/java/org/qortal/settings/Settings.java +++ b/src/main/java/org/qortal/settings/Settings.java @@ -149,6 +149,10 @@ public class Settings { private boolean bootstrap = true; + /** Registered names integrity check */ + private boolean namesIntegrityCheckEnabled = false; + + // Peer-to-peer related private boolean isTestNet = false; /** Port number for inbound peer-to-peer connections. */ @@ -639,6 +643,10 @@ public class Settings { return this.blockPruneBatchSize; } + public boolean isNamesIntegrityCheckEnabled() { + return this.namesIntegrityCheckEnabled; + } + public boolean isArchiveEnabled() { if (this.topOnly) {