progress in removing core
This commit is contained in:
parent
147ae953db
commit
ac70966c41
@ -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):
|
||||
'''
|
||||
|
@ -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
|
@ -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):
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user