Skip to content

Commit 68070ce

Browse files
committed
fix: read index from stored ct_index.json file
This issue caused that scanning ct logs were not properly resumed from where we left off, if the recovery option was enabled.
1 parent 5637156 commit 68070ce

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

internal/certificatetransparency/ct-watcher.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,9 @@ func (w *Watcher) addNewlyAvailableLogs(logList loglist3.LogList) {
149149
w.wg.Add(1)
150150
newCTs++
151151

152-
lastCTIndex := metrics.GetCTIndex(transparencyLog.URL)
152+
// Metrics are initialized with 0.
153+
// Only if recovery is enabled, it is initialized with the last saved index.
154+
lastCTIndex := metrics.GetCTIndex(normalizeCtlogURL(transparencyLog.URL))
153155
ctWorker := worker{
154156
name: transparencyLog.Description,
155157
operatorName: operator.Name,

0 commit comments

Comments
 (0)