diff --git a/services/horizon/internal/ingest/fsm_reingest_history_range_state.go b/services/horizon/internal/ingest/fsm_reingest_history_range_state.go index 4e60f71cd1..e2e7724d68 100644 --- a/services/horizon/internal/ingest/fsm_reingest_history_range_state.go +++ b/services/horizon/internal/ingest/fsm_reingest_history_range_state.go @@ -124,13 +124,14 @@ func (h reingestHistoryRangeState) run(s *system) (transition, error) { h.fromLedger = 2 } - startTime := time.Now() + var startTime time.Time if h.force { if t, err := h.prepareRange(s); err != nil { return t, err } + startTime = time.Now() if err := s.historyQ.Begin(s.ctx); err != nil { return stop(), errors.Wrap(err, "Error starting a transaction") } @@ -167,6 +168,7 @@ func (h reingestHistoryRangeState) run(s *system) (transition, error) { return t, err } + startTime = time.Now() if err := s.historyQ.Begin(s.ctx); err != nil { return stop(), errors.Wrap(err, "Error starting a transaction") }