diff --git a/onionr/communicator.py b/onionr/communicator.py index 8f5c7e36..13f95341 100755 --- a/onionr/communicator.py +++ b/onionr/communicator.py @@ -277,6 +277,10 @@ class OnionrCommunicate: pass else: creator = self._utils.getPeerByHashId(blockMetadata['id']) + try: + creator = creator.decode() + except AttributeError: + pass if self._core._crypto.edVerify(blockContent.split(b'}')[1], creator, blockMetadata['sig'], encodedData=True): self._core.updateBlockInfo(i, 'sig', 'true') else: diff --git a/onionr/onionrutils.py b/onionr/onionrutils.py index 4d2d0ebd..13a915e8 100644 --- a/onionr/onionrutils.py +++ b/onionr/onionrutils.py @@ -336,7 +336,8 @@ class OnionrUtils: metadata = {} try: sig = json.loads(data[0].strip() + '}')['sig'] - signer = self._core._utils.getPeerByHashId(metadata['id']) + sigID = json.loads(data[0].strip() + '}')['id'] + signer = self._core._utils.getPeerByHashId(sigID) logger.debug('signer ' + signer) logger.debug('signature ' + metadata['sig']) except KeyError: