code: func (q *queue) Schedule(headers []*types.Header, from uint64) []*types.Header {
  	q.lock.Lock()
  	defer q.lock.Unlock()
  
  	// Insert all the headers prioritised by the contained block number
  	inserts := make([]*types.Header, 0, len(headers))
  	for _, header := range headers {
  		// Make sure chain order is honoured and preserved throughout
  		hash := header.Hash()
  		if header.Number == nil || header.Number.Uint64() != from {
  			log.Warn("Header broke chain ordering", "number", header.Number, "hash", hash, "expected", from)
  			break
  		}
  		if q.headerHead != (common.Hash{}) && q.headerHead != header.ParentHash {
  			log.Warn("Header broke chain ancestry", "number", header.Number, "hash", hash)
  			break
  		}
  		// Make sure no duplicate requests are executed
  		if _, ok := q.blockTaskPool[hash]; ok {
  			log.Warn("Header already scheduled for block fetch", "number", header.Number, "hash", hash)
  			continue
  		}
  		if _, ok := q.receiptTaskPool[hash]; ok {
  			log.Warn("Header already scheduled for receipt fetch", "number", header.Number, "hash", hash)
  			continue
  		}
  		// Queue the header for content retrieval
  		q.blockTaskPool[hash] = header
  		q.blockTaskQueue.Push(header, -int64(header.Number.Uint64()))
  
  		if q.mode == FastSync {
  			q.receiptTaskPool[hash] = header
  			q.receiptTaskQueue.Push(header, -int64(header.Number.Uint64()))
  		}
  		inserts = append(inserts, header)
  		q.headerHead = hash
  		from++
  	}
  	return inserts
  }
docs: // Schedule adds a set of headers for the download queue for scheduling, returning
  // the new headers encountered.