merged config to get up to date
This commit is contained in:
commit
6ecb1fa75d
10 changed files with 204 additions and 52 deletions
|
@ -53,4 +53,21 @@ class DaemonTools:
|
|||
if self.daemon._core._utils.doPostRequest(url, data) == 'Success':
|
||||
retData = True
|
||||
self.daemon.decrementThreadCount('announceNode')
|
||||
return retData
|
||||
return retData
|
||||
|
||||
def netCheck(self):
|
||||
'''Check if we are connected to the internet or not when we can't connect to any peers'''
|
||||
if len(self.daemon.onlinePeers) != 0:
|
||||
if not self.daemon._core._utils.checkNetwork(torPort=self.daemon.proxyPort):
|
||||
logger.warn('Network check failed, are you connected to the internet?')
|
||||
self.daemon.isOnline = False
|
||||
self.daemon.decrementThreadCount('netCheck')
|
||||
|
||||
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]
|
||||
self.daemon._core._blacklist.addToDB(oldest)
|
||||
self.daemon._core.removeBlock(oldest)
|
||||
logger.info('Deleted block: %s' % (oldest,))
|
||||
self.daemon.decrementThreadCount('cleanOldBlocks')
|
Loading…
Add table
Add a link
Reference in a new issue