do not enforce replay protection on old blocks we're just opening again

This commit is contained in:
KF 2019-02-25 23:40:05 -06:00
parent 651fc8c43c
commit 14e9332b90

View File

@ -88,7 +88,8 @@ class Block:
# Check for replay attacks
try:
assert self.core._crypto.replayTimestampValidation(self.bmetadata['rply'])
if self.core._utils.getEpoch() - self.core.getBlockDate(self.hash) < 60:
assert self.core._crypto.replayTimestampValidation(self.bmetadata['rply'])
except (AssertionError, KeyError) as e:
if not self.bypassReplayCheck:
# Zero out variables to prevent reading of replays