Start and finish syncing.

pull/4455/head
frozen 1 year ago
parent b6987ec68f
commit 525b20ae20
No known key found for this signature in database
GPG Key ID: 5391C63E79B03EDE
  1. 6
      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++

Loading…
Cancel
Save