do not save blocks that are set for the future

This commit is contained in:
Kevin Froman 2018-12-14 21:23:02 -06:00
parent 302f696475
commit 8e35b8b7ad
2 changed files with 4 additions and 0 deletions

View File

@ -391,6 +391,9 @@ class OnionrUtils:
if not self.isIntegerString(metadata[i]):
logger.warn('Block metadata time stamp is not integer string')
break
if metadata[i] > self.getEpoch():
logger.warn('Block metadata time stamp is set for the future, which is not allowed.')
break
elif i == 'expire':
try:
assert int(metadata[i]) > self.getEpoch()

View File

@ -6,6 +6,7 @@
"minimum_send_pow": 5,
"socket_servers": false,
"security_level": 0,
"max_block_age": 2678400,
"public_key": ""
},