code: func New(config *Config) (*SyncManager, error) {
  	sm := SyncManager{
  		peerNotifier:    config.PeerNotifier,
  		chain:           config.Chain,
  		txMemPool:       config.TxMemPool,
  		chainParams:     config.ChainParams,
  		rejectedTxns:    make(map[chainhash.Hash]struct{}),
  		requestedTxns:   make(map[chainhash.Hash]struct{}),
  		requestedBlocks: make(map[chainhash.Hash]struct{}),
  		peerStates:      make(map[*peerpkg.Peer]*peerSyncState),
  		progressLogger:  newBlockProgressLogger("Processed", log),
  		msgChan:         make(chan interface{}, config.MaxPeers*3),
  		headerList:      list.New(),
  		quit:            make(chan struct{}),
  		feeEstimator:    config.FeeEstimator,
  	}
  
  	best := sm.chain.BestSnapshot()
  	if !config.DisableCheckpoints {
  		// Initialize the next checkpoint based on the current height.
  		sm.nextCheckpoint = sm.findNextHeaderCheckpoint(best.Height)
  		if sm.nextCheckpoint != nil {
  			sm.resetHeaderState(&best.Hash, best.Height)
  		}
  	} else {
  		log.Info("Checkpoints are disabled")
  	}
  
  	sm.chain.Subscribe(sm.handleBlockchainNotification)
  
  	return &sm, nil
  }
docs: // New constructs a new SyncManager. Use Start to begin processing asynchronous
  // block, tx, and inv updates.