* reduce spam

* another bytes fix for old python
This commit is contained in:
Kevin Froman 2018-07-19 22:02:09 -05:00
parent ee7e4289f1
commit 862b609687
No known key found for this signature in database
GPG Key ID: 0D414D0FE405B63B
2 changed files with 11 additions and 4 deletions

View File

@ -81,7 +81,13 @@ class Block:
if self.getHeader('encryptType') == 'asym':
try:
self.bcontent = core._crypto.pubKeyDecrypt(self.bcontent, anonymous=anonymous, encodedData=encodedData)
self.bmetadata = json.loads(core._crypto.pubKeyDecrypt(self.bmetadata, anonymous=anonymous, encodedData=encodedData))
bmeta = core._crypto.pubKeyDecrypt(self.bmetadata, anonymous=anonymous, encodedData=encodedData)
try:
bmeta = bmeta.decode()
except AttributeError:
# yet another bytes fix
pass
self.bmetadata = json.loads(bmeta)
self.signature = core._crypto.pubKeyDecrypt(self.signature, anonymous=anonymous, encodedData=encodedData)
self.signer = core._crypto.pubKeyDecrypt(self.signer, anonymous=anonymous, encodedData=encodedData)
self.signedData = json.dumps(self.bmetadata) + self.bcontent.decode()
@ -101,7 +107,6 @@ class Block:
if core._crypto.edVerify(data=self.signedData, key=self.signer, sig=self.signature, encodedData=True):
self.validSig = True
print('ded')
else:
self.validSig = False
return self.validSig

View File

@ -117,7 +117,8 @@ class OnionrUtils:
else:
logger.warn("Failed to add key")
else:
logger.debug('%s pow failed' % key[0])
pass
#logger.debug('%s pow failed' % key[0])
return retVal
except Exception as error:
logger.error('Failed to merge keys.', error=error)
@ -137,7 +138,8 @@ class OnionrUtils:
logger.info('Added %s to db.' % adder, timestamp = True)
retVal = True
else:
logger.debug('%s is either our address or already in our DB' % adder)
pass
#logger.debug('%s is either our address or already in our DB' % adder)
return retVal
except Exception as error:
logger.error('Failed to merge adders.', error = error)