Disable the names integrity check on startup by default.

This isn't really needed and is risky leaving it enabled, as there may be other unsupported cases.
This commit is contained in:
CalDescent 2021-12-19 20:54:19 +00:00
parent d16663f0a9
commit a8a498ddea
2 changed files with 12 additions and 2 deletions

View File

@ -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();
if (Settings.getInstance().isNamesIntegrityCheckEnabled()) {
namesDatabaseIntegrityCheck.runIntegrityCheck();
}
LOGGER.info("Validating blockchain");
try {

View File

@ -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) {