From 6cb39795a90888cf45541f5dbb4958d54719eb42 Mon Sep 17 00:00:00 2001 From: CalDescent Date: Fri, 20 Aug 2021 17:00:53 +0100 Subject: [PATCH] Removed requirement to have connected peers in order to cleanup directories. --- .../arbitrary/ArbitraryDataCleanupManager.java | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/main/java/org/qortal/controller/arbitrary/ArbitraryDataCleanupManager.java b/src/main/java/org/qortal/controller/arbitrary/ArbitraryDataCleanupManager.java index 2e00b448..a3500766 100644 --- a/src/main/java/org/qortal/controller/arbitrary/ArbitraryDataCleanupManager.java +++ b/src/main/java/org/qortal/controller/arbitrary/ArbitraryDataCleanupManager.java @@ -40,7 +40,6 @@ public class ArbitraryDataCleanupManager extends Thread { /* TODO: - - Discard all files relating to transactions for a name/service combination before the most recent PUT - Delete old files from _temp - Delete old files not associated with transactions */ @@ -77,17 +76,7 @@ public class ArbitraryDataCleanupManager extends Thread { // Don't attempt to make decisions if we haven't synced our time yet continue; } - - List peers = Network.getInstance().getHandshakedPeers(); - - // Disregard peers that have "misbehaved" recently - peers.removeIf(Controller.hasMisbehaved); - - // Don't fetch data if we don't have enough up-to-date peers - if (peers.size() < Settings.getInstance().getMinBlockchainPeers()) { - continue; - } - + // Any arbitrary transactions we want to fetch data for? try (final Repository repository = RepositoryManager.getRepository()) { List signatures = repository.getTransactionRepository().getSignaturesMatchingCriteria(null, null, null, ARBITRARY_TX_TYPE, null, null, ConfirmationStatus.BOTH, limit, offset, true);