We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 49aa869 commit 85fb736Copy full SHA for 85fb736
1 file changed
syncer/syncer.go
@@ -717,11 +717,11 @@ func (s *Syncer) syncLoop(ctx context.Context) error {
717
if err := s.parallelSync(ctx, r.cs, r.headers); err != nil {
718
s.log.Debug("sync failed", zap.Stringer("peer", r.peer), zap.Error(err))
719
} else if r.remaining == 0 {
720
- // peer sent all their headers; mark as synced to avoid
721
- // re-downloading the same blocks over and over again
+ // peer sent all their headers; mark them as synced and
+ // relay their tip
722
r.peer.setSynced(true)
723
+ go s.relayV2Header(r.headers[len(r.headers)-1], r.peer)
724
}
- go s.relayV2Header(r.headers[len(r.headers)-1], r.peer)
725
726
727
0 commit comments