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
'''
logger.error('Command not found.', timestamp = False, terminal=True)
logger.error('Invalid command.', timestamp = False, terminal=True)
def showHelpSuggestion(self):
'''

View File

@ -138,11 +138,11 @@ def insert_block(data, header='txt', sign=False, encryptType='', symKey='', asym
pass
coredb.blockmetadb.add.add_to_block_DB(retData, selfInsert=True, dataSaved=True)
blockmetadata.process_block_metadata(retData)
'''
if retData != False:
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:
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

View File

@ -126,13 +126,13 @@ def kill_daemon(o_inst):
events.event('daemon_stop', onionr = o_inst)
net = NetController(o_inst.config.get('client.port', 59496))
try:
daemonqueue.daemon_queue_qdd('shutdown')
daemonqueue.daemon_queue_add('shutdown')
except sqlite3.OperationalError:
pass
net.killTor()
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
def start(o_inst, input = False, override = False):

View File

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