code: func (sm *SyncManager) updateSyncPeer(dcSyncPeer bool) {
  	log.Debugf("Updating sync peer, no progress for: %v",
  		time.Since(sm.lastProgressTime))
  
  	// First, disconnect the current sync peer if requested.
  	if dcSyncPeer {
  		sm.syncPeer.Disconnect()
  	}
  
  	// Reset any header state before we choose our next active sync peer.
  	if sm.headersFirstMode {
  		best := sm.chain.BestSnapshot()
  		sm.resetHeaderState(&best.Hash, best.Height)
  	}
  
  	sm.syncPeer = nil
  	sm.startSync()
  }
docs: // updateSyncPeer choose a new sync peer to replace the current one. If
  // dcSyncPeer is true, this method will also disconnect the current sync peer.
  // If we are in header first mode, any header state related to prefetching is
  // also reset in preparation for the next sync peer.