From 525b20ae20a8d503cd3932cc2b7053627e9758cf Mon Sep 17 00:00:00 2001 From: frozen <355847+Frozen@users.noreply.github.com> Date: Tue, 13 Jun 2023 21:14:34 -0400 Subject: [PATCH] Start and finish syncing. --- api/service/stagedstreamsync/syncing.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/service/stagedstreamsync/syncing.go b/api/service/stagedstreamsync/syncing.go index bf5b59526..3ebb4f21b 100644 --- a/api/service/stagedstreamsync/syncing.go +++ b/api/service/stagedstreamsync/syncing.go @@ -227,6 +227,9 @@ func (s *StagedStreamSync) doSync(downloaderContext context.Context, initSync bo return 0, 0, err } + s.startSyncing() + defer s.finishSyncing() + var estimatedHeight uint64 if initSync { if h, err := s.estimateCurrentNumber(downloaderContext); err != nil { @@ -243,9 +246,6 @@ func (s *StagedStreamSync) doSync(downloaderContext context.Context, initSync bo } } - s.startSyncing() - defer s.finishSyncing() - i := 0 for { i++