aboutsummaryrefslogtreecommitdiff
path: root/internal/monitor/tail.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/monitor/tail.go')
-rw-r--r--internal/monitor/tail.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/monitor/tail.go b/internal/monitor/tail.go
index 98ce4e0..2ad8135 100644
--- a/internal/monitor/tail.go
+++ b/internal/monitor/tail.go
@@ -136,6 +136,9 @@ func (t *tail) nextConsistentState(ctx context.Context, state State) (State, err
if err != nil {
return State{}, fmt.Errorf("%s: get-sth: %v", t.checker.BaseURI(), err)
}
+ if sth.Timestamp < state.Timestamp {
+ return State{}, fmt.Errorf("%s: get-sth: timestamp is shrinking", t.checker.BaseURI())
+ }
sth.LogID = state.SignedTreeHead.LogID
oldSize := state.TreeSize
oldRoot := state.SHA256RootHash