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
|
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):
|
||||||
'''
|
'''
|
||||||
|
@ -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
|
@ -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):
|
||||||
|
@ -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):
|
||||||
|
Loading…
Reference in New Issue
Block a user