signed blocks related crashes fixed hopefully

This commit is contained in:
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
else:
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')
else:
self._core.updateBlockInfo(i, 'sig', 'false')

View File

@ -376,7 +376,7 @@ class Onionr:
break
#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.setBlockType(addedHash, 'txt')
logger.info("inserted your message as block: " + addedHash)