Commit c51d31a 1 parent c386ee0 commit c51d31a Copy full SHA for c51d31a
File tree 1 file changed +4
-6
lines changed
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -409,12 +409,6 @@ func (sm *SyncManager) startSync() {
409
409
410
410
// Start syncing from the best peer if one was selected.
411
411
if bestPeer != nil {
412
- if ! sm .headersFirstMode {
413
- // Clear the requestedBlocks if the sync peer changes, otherwise
414
- // we may ignore blocks we need that the last sync peer failed
415
- // to send.
416
- sm .requestedBlocks = make (map [chainhash.Hash ]struct {})
417
- }
418
412
locator , err := sm .chain .LatestBlockLocator ()
419
413
if err != nil {
420
414
log .Errorf ("Failed to get block locator for the " +
@@ -452,6 +446,10 @@ func (sm *SyncManager) startSync() {
452
446
"%d from peer %s" , best .Height + 1 ,
453
447
sm .nextCheckpoint .Height , bestPeer .Addr ())
454
448
} else {
449
+ // Clear the requestedBlocks if the sync peer changes, otherwise
450
+ // we may ignore blocks we need that the last sync peer failed
451
+ // to send.
452
+ sm .requestedBlocks = make (map [chainhash.Hash ]struct {})
455
453
bestPeer .PushGetBlocksMsg (locator , & zeroHash )
456
454
}
457
455
sm .syncPeer = bestPeer
You can’t perform that action at this time.
0 commit comments