Added new settings "fastSyncEnabled" (default: false) and "fastSyncEnabledWhenResolvingFork" (default: true).

This commit is contained in:
CalDescent 2021-03-27 17:59:23 +00:00
parent a5308995b7
commit dbcf6de2d5

View File

@ -123,6 +123,11 @@ public class Settings {
/** Maximum number of threads for network proof-of-work compute, used during handshaking. */
private int networkPoWComputePoolSize = 2;
/** Whether to sync multiple blocks at once in normal operation */
private boolean fastSyncEnabled = false;
/** Whether to sync multiple blocks at once when the peer has a different chain */
private boolean fastSyncEnabledWhenResolvingFork = true;
// Which blockchains this node is running
private String blockchainConfig = null; // use default from resources
private BitcoinNet bitcoinNet = BitcoinNet.MAIN;
@ -436,6 +441,14 @@ public class Settings {
return this.repositoryConnectionPoolSize;
}
public boolean isFastSyncEnabled() {
return this.fastSyncEnabled;
}
public boolean isFastSyncEnabledWhenResolvingFork() {
return this.fastSyncEnabledWhenResolvingFork;
}
public boolean isAutoUpdateEnabled() {
return this.autoUpdateEnabled;
}