Disabled all arbitrary data manager threads if QDN is disabled in the settings.

This commit is contained in:
CalDescent 2021-12-23 22:19:14 +00:00
parent 6436daca08
commit b774583f28
3 changed files with 18 additions and 0 deletions

View File

@ -79,6 +79,12 @@ public class ArbitraryDataCleanupManager extends Thread {
while (!isStopping) {
Thread.sleep(30000);
// Don't run if QDN is disabled
if (!Settings.getInstance().isQdnEnabled()) {
Thread.sleep(60 * 60 * 1000L);
continue;
}
Long now = NTP.getTime();
if (now == null) {
// Don't attempt to make decisions if we haven't synced our time yet

View File

@ -74,6 +74,12 @@ public class ArbitraryDataManager extends Thread {
while (!isStopping) {
Thread.sleep(2000);
// Don't run if QDN is disabled
if (!Settings.getInstance().isQdnEnabled()) {
Thread.sleep(60 * 60 * 1000L);
continue;
}
List<Peer> peers = Network.getInstance().getHandshakedPeers();
// Disregard peers that have "misbehaved" recently

View File

@ -73,6 +73,12 @@ public class ArbitraryDataStorageManager extends Thread {
while (!isStopping) {
Thread.sleep(1000);
// Don't run if QDN is disabled
if (!Settings.getInstance().isQdnEnabled()) {
Thread.sleep(60 * 60 * 1000L);
continue;
}
Long now = NTP.getTime();
if (now == null) {
continue;