From 14e9332b90dc56448a5e42a892700e7a1f458530 Mon Sep 17 00:00:00 2001 From: KF Date: Mon, 25 Feb 2019 23:40:05 -0600 Subject: [PATCH] do not enforce replay protection on old blocks we're just opening again --- onionr/onionrblockapi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/onionr/onionrblockapi.py b/onionr/onionrblockapi.py index caa9bee1..e7a4395b 100755 --- a/onionr/onionrblockapi.py +++ b/onionr/onionrblockapi.py @@ -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