adjust expiration
This commit is contained in:
parent
59cc7709d9
commit
7048db42bd
3 changed files with 10 additions and 9 deletions
|
@ -107,17 +107,18 @@ class DaemonTools:
|
|||
def cleanOldBlocks(self):
|
||||
'''Delete old blocks if our disk allocation is full/near full, and also expired blocks'''
|
||||
|
||||
# Delete expired blocks
|
||||
for bHash in self.daemon._core.getExpiredBlocks():
|
||||
self.daemon._core._blacklist.addToDB(bHash)
|
||||
self.daemon._core.removeBlock(bHash)
|
||||
logger.info('Deleted block: %s' % (bHash,))
|
||||
|
||||
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,))
|
||||
|
||||
# Delete expired blocks
|
||||
for bHash in self.daemon._core.getExpiredBlocks():
|
||||
self.daemon._core._blacklist.addToDB(bHash)
|
||||
self.daemon._core.removeBlock(bHash)
|
||||
|
||||
self.daemon.decrementThreadCount('cleanOldBlocks')
|
||||
|
||||
def cleanKeys(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue