From 638436ee10c535999d4334be4e55e5ff4c8b596a Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Thu, 23 Aug 2018 13:02:48 -0500 Subject: [PATCH] sync improvements, bug fixes, config changes --- onionr/onionrdaemontools.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/onionr/onionrdaemontools.py b/onionr/onionrdaemontools.py index f269f028..e36945c0 100644 --- a/onionr/onionrdaemontools.py +++ b/onionr/onionrdaemontools.py @@ -65,7 +65,9 @@ class DaemonTools: def cleanOldBlocks(self): '''Delete old blocks if our disk allocation is full/near full''' - if self.daemon._core._utils.storageCounter.isFull(): - - + while self.daemon._core._utils.storageCounter.isFull(): + oldest = self.daemon._core.getBlockList[0] + self.daemon._core._blacklist.addToDB(oldest) + self.daemon._core.removeBlock(oldest) + logger.info('Deleted block: %s' % (oldest,)) self.daemon.decrementThreadCount('cleanOldBlocks') \ No newline at end of file