From 1c80849c38ea1836bfd079889ce3a718c01d3d60 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Thu, 19 Jul 2018 16:31:48 -0500 Subject: [PATCH] do not attempt block decryption in metadata processing if it is not encrypted --- onionr/onionrutils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/onionr/onionrutils.py b/onionr/onionrutils.py index 5ecf14bc..64717a57 100644 --- a/onionr/onionrutils.py +++ b/onionr/onionrutils.py @@ -256,7 +256,8 @@ class OnionrUtils: Read metadata from a block and cache it to the block database ''' myBlock = Block(blockHash, self._core) - myBlock.decrypt() + if myBlock.isEncrypted: + myBlock.decrypt() blockType = myBlock.getMetadata('type') # we would use myBlock.getType() here, but it is bugged with encrypted blocks try: if len(blockType) <= 10: