bug fixes and performence improvements

This commit is contained in:
Kevin Froman 2019-01-21 21:29:29 -06:00
parent 4d5e0aeb74
commit aef6d5d8e6
3 changed files with 16 additions and 8 deletions

View file

@ -207,22 +207,27 @@ class OnionrMail:
else:
# if -q or ctrl-c/d, exit function here, otherwise we successfully got the public key
return
logger.info('Enter your message, stop by entering -q on a new line.')
cancelEnter = False
logger.info('Enter your message, stop by entering -q on a new line. -c to cancel')
while newLine != '-q':
try:
newLine = input()
except (KeyboardInterrupt, EOFError):
pass
cancelEnter = True
if newLine == '-c':
cancelEnter = True
break
if newLine == '-q':
continue
newLine += '\n'
message += newLine
logger.info('Inserting encrypted message as Onionr block....')
if not cancelEnter:
logger.info('Inserting encrypted message as Onionr block....')
blockID = self.myCore.insertBlock(message, header='pm', encryptType='asym', asymPeer=recip, sign=True)
self.sentboxTools.addToSent(blockID, recip, message)
blockID = self.myCore.insertBlock(message, header='pm', encryptType='asym', asymPeer=recip, sign=True)
self.sentboxTools.addToSent(blockID, recip, message)
def menu(self):
choice = ''
while True:

View file

@ -79,7 +79,7 @@
"peers" : {
"minimum_score" : -100,
"max_stored_peers" : 5000,
"max_connect" : 50
"max_connect" : 1000
},
"timers" : {