moved length check in hash validation
This commit is contained in:
parent
1c3e886ba0
commit
8c6a04f03d
@ -108,12 +108,13 @@ class OnionrCommunicate:
|
||||
logger.debug('BLOCKS: \n' + blocks)
|
||||
blockList = blocks.split('\n')
|
||||
for i in blockList:
|
||||
if len(i.strip()) == 0:
|
||||
continue
|
||||
if self._utils.hasBlock(i):
|
||||
continue
|
||||
logger.debug('Exchanged block (blockList): ' + i)
|
||||
if not self._utils.validateHash(i):
|
||||
# skip hash if it isn't valid
|
||||
if len(i.strip()) != 0:
|
||||
logger.warn('Hash ' + i + ' is not valid')
|
||||
continue
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user