We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 37269b7 commit ed649eaCopy full SHA for ed649ea
1 file changed
internal/certificatetransparency/ct-watcher.go
@@ -300,8 +300,9 @@ func (w *worker) runWorker(ctx context.Context) error {
300
return errCreatingClient
301
}
302
303
- validSavedCTIndexExists := config.AppConfig.General.ResumeFromCTIndexFile && w.ctIndex >= 0
304
- if !validSavedCTIndexExists || config.AppConfig.General.StartAtLatestSTH {
+ // If recovery is enabled and the CT index is set, we start at the saved index. Otherwise we start at the latest STH.
+ validSavedCTIndexExists := config.AppConfig.General.Recovery.Enabled && w.ctIndex >= 0
305
+ if !validSavedCTIndexExists {
306
sth, getSTHerr := jsonClient.GetSTH(ctx)
307
if getSTHerr != nil {
308
// TODO this can happen due to a 429 error. We should retry the request
0 commit comments