* fixed broken block metadata validation, incorrect time integer check and missing size value for encryptType
parent
9083775887
commit
33787ef39d
|
@ -329,6 +329,7 @@ class OnionrUtils:
|
|||
break
|
||||
if i == 'time':
|
||||
if not self.isIntegerString(metadata[i]):
|
||||
logger.warn('Block metadata time stamp is not integer string')
|
||||
break
|
||||
else:
|
||||
# if metadata loop gets no errors, it does not break, therefore metadata is valid
|
||||
|
@ -358,9 +359,9 @@ class OnionrUtils:
|
|||
try:
|
||||
int(data)
|
||||
except ValueError:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
def validateID(self, id):
|
||||
'''
|
||||
|
|
|
@ -21,4 +21,4 @@
|
|||
class OnionrValues:
|
||||
def __init__(self):
|
||||
self.passwordLength = 20
|
||||
self.blockMetadataLengths = {'meta': 1000, 'sig': 88, 'signer': 64, 'time': 10, 'powRandomToken': '1000'}
|
||||
self.blockMetadataLengths = {'meta': 1000, 'sig': 88, 'signer': 64, 'time': 10, 'powRandomToken': 1000, 'encryptType': 4}
|
Loading…
Reference in New Issue