improve verifypow error message info to show affected block

This commit is contained in:
Kevin 2020-06-27 18:05:39 -05:00
parent cc41ad793e
commit e9bbd38aab

View File

@ -31,7 +31,7 @@ def verify_POW(blockContent):
# logger.debug('Validated block pow') # logger.debug('Validated block pow')
retData = True retData = True
else: else:
logger.debug("Invalid token, bad proof") logger.debug(f"Invalid token, bad proof for {blockHash} {puzzle}")
raise onionrexceptions.InvalidProof('Proof for %s needs to be %s' % (blockHash, puzzle)) raise onionrexceptions.InvalidProof('Proof for %s needs to be %s' % (blockHash, puzzle))
return retData return retData