From 28e080fe1a0eda77527c29d479e1e277b5f6c9fd Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Thu, 26 Apr 2018 21:08:56 -0500 Subject: [PATCH] signed blocks related crashes fixed hopefully --- onionr/communicator.py | 3 ++- onionr/onionr.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/onionr/communicator.py b/onionr/communicator.py index ee23a8e1..a2b8fb9f 100755 --- a/onionr/communicator.py +++ b/onionr/communicator.py @@ -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') diff --git a/onionr/onionr.py b/onionr/onionr.py index af1042c3..811e4487 100755 --- a/onionr/onionr.py +++ b/onionr/onionr.py @@ -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)