Added logs.

pull/4455/head
frozen 1 year ago
parent fad17fe539
commit c63818480c
No known key found for this signature in database
GPG Key ID: 5391C63E79B03EDE
  1. 4
      api/service/stagedstreamsync/syncing.go

@ -246,7 +246,9 @@ func (s *StagedStreamSync) doSync(downloaderContext context.Context, initSync bo
s.startSyncing() s.startSyncing()
defer s.finishSyncing() defer s.finishSyncing()
i := 0
for { for {
i++
ctx, cancel := context.WithCancel(downloaderContext) ctx, cancel := context.WithCancel(downloaderContext)
started := s.bc.CurrentHeader().NumberU64() started := s.bc.CurrentHeader().NumberU64()
n, err := s.doSyncCycle(ctx, initSync) n, err := s.doSyncCycle(ctx, initSync)
@ -255,6 +257,8 @@ func (s *StagedStreamSync) doSync(downloaderContext context.Context, initSync bo
Uint64("from", started). Uint64("from", started).
Int("returned", n). Int("returned", n).
Uint64("to", finished). Uint64("to", finished).
Bool("initSync", initSync).
Int("cycle", i).
Msg(WrapStagedSyncMsg("synced blocks")) Msg(WrapStagedSyncMsg("synced blocks"))
if err != nil { if err != nil {
utils.Logger().Error(). utils.Logger().Error().

Loading…
Cancel
Save