progress in removing core

This commit is contained in:
Kevin Froman 2019-07-24 13:23:31 -05:00
parent 147ae953db
commit ac70966c41
4 changed files with 8 additions and 8 deletions

View File

@ -348,7 +348,7 @@ class Onionr:
Displays a "command not found" message Displays a "command not found" message
''' '''
logger.error('Command not found.', timestamp = False, terminal=True) logger.error('Invalid command.', timestamp = False, terminal=True)
def showHelpSuggestion(self): def showHelpSuggestion(self):
''' '''

View File

@ -138,11 +138,11 @@ def insert_block(data, header='txt', sign=False, encryptType='', symKey='', asym
pass pass
coredb.blockmetadb.add.add_to_block_DB(retData, selfInsert=True, dataSaved=True) coredb.blockmetadb.add.add_to_block_DB(retData, selfInsert=True, dataSaved=True)
blockmetadata.process_block_metadata(retData) blockmetadata.process_block_metadata(retData)
'''
if retData != False: if retData != False:
if plaintextPeer == onionrvalues.DENIABLE_PEER_ADDRESS: if plaintextPeer == onionrvalues.DENIABLE_PEER_ADDRESS:
events.event('insertdeniable', {'content': plaintext, 'meta': plaintextMeta, 'hash': retData, 'peer': bytesconverter.bytes_to_str(asymPeer)}, onionr = self.onionrInst, threaded = True) events.event('insertdeniable', {'content': plaintext, 'meta': plaintextMeta, 'hash': retData, 'peer': bytesconverter.bytes_to_str(asymPeer)}, threaded = True)
else: else:
events.event('insertblock', {'content': plaintext, 'meta': plaintextMeta, 'hash': retData, 'peer': bytesconverter.bytes_to_str(asymPeer)}, onionr = self.onionrInst, threaded = True) events.event('insertblock', {'content': plaintext, 'meta': plaintextMeta, 'hash': retData, 'peer': bytesconverter.bytes_to_str(asymPeer)}, threaded = True)
'''
return retData return retData

View File

@ -126,13 +126,13 @@ def kill_daemon(o_inst):
events.event('daemon_stop', onionr = o_inst) events.event('daemon_stop', onionr = o_inst)
net = NetController(o_inst.config.get('client.port', 59496)) net = NetController(o_inst.config.get('client.port', 59496))
try: try:
daemonqueue.daemon_queue_qdd('shutdown') daemonqueue.daemon_queue_add('shutdown')
except sqlite3.OperationalError: except sqlite3.OperationalError:
pass pass
net.killTor() net.killTor()
except Exception as e: except Exception as e:
logger.error('Failed to shutdown daemon.', error = e, timestamp = False, terminal=True) logger.error('Failed to shutdown daemon: ' + str(e), error = e, timestamp = False, terminal=True)
return return
def start(o_inst, input = False, override = False): def start(o_inst, input = False, override = False):

View File

@ -305,7 +305,7 @@ def add_deleted(keyStore, bHash):
def on_insertblock(api, data={}): def on_insertblock(api, data={}):
meta = json.loads(data['meta']) meta = json.loads(data['meta'])
if meta['type'] == 'pm': if meta['type'] == 'pm':
sentboxTools = sentboxdb.SentBox(api.get_core()) sentboxTools = sentboxdb.SentBox()
sentboxTools.addToSent(data['hash'], data['peer'], data['content'], meta['subject']) sentboxTools.addToSent(data['hash'], data['peer'], data['content'], meta['subject'])
def on_init(api, data = None): def on_init(api, data = None):