signed blocks related crashes fixed hopefully

master
Kevin Froman 2018-04-26 21:08:56 -05:00
parent 388b1b6e1f
commit 28e080fe1a
2 changed files with 3 additions and 2 deletions

View File

@ -277,7 +277,8 @@ class OnionrCommunicate:
pass pass
else: else:
creator = self._utils.getPeerByHashId(blockMetadata['id']) creator = self._utils.getPeerByHashId(blockMetadata['id'])
if self._crypto.edVerify(blockContent.split(b'}')[1], creator, blockMetadata['sig'], encodedData=True): logger.debug('Proccess blocks: verifying signature by ' + creator)
if self._core._crypto.edVerify(blockContent.split(b'}')[1], creator, blockMetadata['sig'], encodedData=True):
self._core.updateBlockInfo(i, 'sig', 'true') self._core.updateBlockInfo(i, 'sig', 'true')
else: else:
self._core.updateBlockInfo(i, 'sig', 'false') self._core.updateBlockInfo(i, 'sig', 'false')

View File

@ -376,7 +376,7 @@ class Onionr:
break break
#addedHash = self.onionrCore.setData(messageToAdd) #addedHash = self.onionrCore.setData(messageToAdd)
addedHash = self.onionrCore.insertBlock(messageToAdd, header='') addedHash = self.onionrCore.insertBlock(messageToAdd, header='txt')
#self.onionrCore.addToBlockDB(addedHash, selfInsert=True) #self.onionrCore.addToBlockDB(addedHash, selfInsert=True)
#self.onionrCore.setBlockType(addedHash, 'txt') #self.onionrCore.setBlockType(addedHash, 'txt')
logger.info("inserted your message as block: " + addedHash) logger.info("inserted your message as block: " + addedHash)