do not attempt block decryption in metadata processing if it is not encrypted

master
Kevin Froman 2018-07-19 16:31:48 -05:00
parent 85fdcab534
commit 1c80849c38
No known key found for this signature in database
GPG Key ID: 0D414D0FE405B63B
1 changed files with 2 additions and 1 deletions

View File

@ -256,6 +256,7 @@ class OnionrUtils:
Read metadata from a block and cache it to the block database Read metadata from a block and cache it to the block database
''' '''
myBlock = Block(blockHash, self._core) myBlock = Block(blockHash, self._core)
if myBlock.isEncrypted:
myBlock.decrypt() myBlock.decrypt()
blockType = myBlock.getMetadata('type') # we would use myBlock.getType() here, but it is bugged with encrypted blocks blockType = myBlock.getMetadata('type') # we would use myBlock.getType() here, but it is bugged with encrypted blocks
try: try: