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)
|
logger.debug('BLOCKS: \n' + blocks)
|
||||||
blockList = blocks.split('\n')
|
blockList = blocks.split('\n')
|
||||||
for i in blockList:
|
for i in blockList:
|
||||||
|
if len(i.strip()) == 0:
|
||||||
|
continue
|
||||||
if self._utils.hasBlock(i):
|
if self._utils.hasBlock(i):
|
||||||
continue
|
continue
|
||||||
logger.debug('Exchanged block (blockList): ' + i)
|
logger.debug('Exchanged block (blockList): ' + i)
|
||||||
if not self._utils.validateHash(i):
|
if not self._utils.validateHash(i):
|
||||||
# skip hash if it isn't valid
|
# skip hash if it isn't valid
|
||||||
if len(i.strip()) != 0:
|
|
||||||
logger.warn('Hash ' + i + ' is not valid')
|
logger.warn('Hash ' + i + ' is not valid')
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user