From 1faae80aafdc4907a158bc7cb78e763762a993eb Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Thu, 23 Aug 2018 13:24:32 -0500 Subject: [PATCH] sync improvements, bug fixes, config changes --- onionr/core.py | 2 ++ onionr/onionrdaemontools.py | 2 +- onionr/storagecounter.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/onionr/core.py b/onionr/core.py index 13c89c9e..c6495f2f 100644 --- a/onionr/core.py +++ b/onionr/core.py @@ -175,6 +175,8 @@ class Core: def removeBlock(self, block): ''' remove a block from this node (does not automatically blacklist) + + **You may want blacklist.addToDB(blockHash) ''' if self._utils.validateHash(block): conn = sqlite3.connect(self.blockDB) diff --git a/onionr/onionrdaemontools.py b/onionr/onionrdaemontools.py index e36945c0..ff4a9b3f 100644 --- a/onionr/onionrdaemontools.py +++ b/onionr/onionrdaemontools.py @@ -66,7 +66,7 @@ class DaemonTools: def cleanOldBlocks(self): '''Delete old blocks if our disk allocation is full/near full''' while self.daemon._core._utils.storageCounter.isFull(): - oldest = self.daemon._core.getBlockList[0] + oldest = self.daemon._core.getBlockList()[0] self.daemon._core._blacklist.addToDB(oldest) self.daemon._core.removeBlock(oldest) logger.info('Deleted block: %s' % (oldest,)) diff --git a/onionr/storagecounter.py b/onionr/storagecounter.py index a5c11f21..b88bc4f5 100644 --- a/onionr/storagecounter.py +++ b/onionr/storagecounter.py @@ -27,7 +27,7 @@ class StorageCounter: def isFull(self): retData = False - if self._core.config.get('allocations.disk') <= (self.getAmount() + 100): + if self._core.config.get('allocations.disk') <= (self.getAmount() + 500): retData = True return retData