sync improvements, bug fixes, config changes
This commit is contained in:
parent
638436ee10
commit
1faae80aaf
@ -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)
|
||||
|
@ -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,))
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user