signed blocks related crashes fixed hopefully
parent
388b1b6e1f
commit
28e080fe1a
|
@ -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')
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue