merging master

master
Kevin Froman 2018-12-16 12:27:51 -06:00
parent 12fb92444a
commit 074a0e796f
1 changed files with 0 additions and 8 deletions

View File

@ -393,20 +393,12 @@ class OnionrUtils:
if not self.isIntegerString(metadata[i]): if not self.isIntegerString(metadata[i]):
logger.warn('Block metadata time stamp is not integer string or int') logger.warn('Block metadata time stamp is not integer string or int')
break break
<<<<<<< HEAD
isFuture = (metadata[i] - self.getEpoch()) isFuture = (metadata[i] - self.getEpoch())
if isFuture > maxClockDifference: if isFuture > maxClockDifference:
logger.warn('Block timestamp is skewed to the future over the max %s: %s' (maxClockDifference, isFuture)) logger.warn('Block timestamp is skewed to the future over the max %s: %s' (maxClockDifference, isFuture))
break break
if (self.getEpoch() - metadata[i]) > maxAge: if (self.getEpoch() - metadata[i]) > maxAge:
logger.warn('Block is outdated: %s' % (metadata[i],)) logger.warn('Block is outdated: %s' % (metadata[i],))
=======
if (metadata[i] - self.getEpoch()) > 30:
logger.warn('Block metadata time stamp is set for the future, which is not allowed.')
break
if (self.getEpoch() - metadata[i]) > maxAge:
logger.warn('Block is older than allowed: %s' % (maxAge,))
>>>>>>> 66da0b87cf12cf75cdecd90881385b17ad2b07ef
elif i == 'expire': elif i == 'expire':
try: try:
assert int(metadata[i]) > self.getEpoch() assert int(metadata[i]) > self.getEpoch()