progress in removing core
This commit is contained in:
parent
e351710189
commit
348ec1081f
23 changed files with 78 additions and 1454 deletions
|
@ -29,8 +29,9 @@ from communicatorutils import daemonqueuehandler, announcenode, deniableinserts
|
|||
from communicatorutils import cooldownpeer, housekeeping, netcheck
|
||||
from onionrutils import localcommand, epoch
|
||||
from etc import humanreadabletime
|
||||
import onionrservices, onionr, filepaths
|
||||
import onionrservices, onionr, filepaths, storagecounter
|
||||
from coredb import daemonqueue, dbfiles
|
||||
from utils import gettransports
|
||||
OnionrCommunicatorTimers = onionrcommunicatortimers.OnionrCommunicatorTimers
|
||||
|
||||
config.reload()
|
||||
|
@ -39,8 +40,11 @@ class OnionrCommunicatorDaemon:
|
|||
onionrInst.communicatorInst = self
|
||||
# configure logger and stuff
|
||||
onionr.Onionr.setupConfig('data/', self = self)
|
||||
self.onionrInst = onionrInst
|
||||
self.config = config
|
||||
self.storage_counter = storagecounter.StorageCounter()
|
||||
self.proxyPort = proxyPort
|
||||
|
||||
self.hsAddress = gettransports.get()[0]
|
||||
self.isOnline = True # Assume we're connected to the internet
|
||||
|
||||
# list of timer instances
|
||||
|
|
|
@ -25,6 +25,6 @@ def add_bootstrap_list_to_peer_list(comm_inst, peerList):
|
|||
Add the bootstrap list to the peer list (no duplicates)
|
||||
'''
|
||||
for i in bootstrap_peers:
|
||||
if i not in peerList and i not in comm_inst.offlinePeers and i != gettransports.get_transports()[0] and len(str(i).strip()) > 0:
|
||||
if i not in peerList and i not in comm_inst.offlinePeers and i != gettransports.get()[0] and len(str(i).strip()) > 0:
|
||||
peerList.append(i)
|
||||
keydb.addkeys.add_address(i)
|
|
@ -33,7 +33,7 @@ def peer_action(comm_inst, peer, action, data='', returnHeaders=False, max_resp_
|
|||
|
||||
keydb.transportinfo.set_address_info(peer, 'lastConnectAttempt', epoch.get_epoch()) # mark the time we're trying to request this peer
|
||||
try:
|
||||
retData = basicrequests.do_get_request(url, port=comm_inst.proxyPort, max_size=max_resp_size)
|
||||
retData = basicrequests.do_get_request(comm_inst.onionrInst, url, port=comm_inst.proxyPort, max_size=max_resp_size)
|
||||
except streamedrequests.exceptions.ResponseLimitReached:
|
||||
logger.warn('Request failed due to max response size being overflowed', terminal=True)
|
||||
retData = False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue