aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsiglog-witness.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/siglog-witness.py b/siglog-witness.py
index 3b79c8d..0ddb8b7 100755
--- a/siglog-witness.py
+++ b/siglog-witness.py
@@ -203,7 +203,13 @@ class TreeHead:
self.root_hash,
prev.root_hash))
- # Same hash and size but new timestamp is ok.
+ # New timestamp but same hash and size is ok but there's no
+ # consistency to prove.
+ if self.root_hash == prev.root_hash:
+ assert(self.tree_size == prev.tree_size)
+ assert(self.timestamp != prev.timestamp)
+ print("INFO: Signing re-published head of tree of size {}".format(self.tree_size))
+ return None # Success
proof, err = fetch_consistency_proof(prev.tree_size, self.tree_size)
if err: return err