|
|
@ -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(). |
|
|
|