code: func (p *FakePeer) RequestHeadersByHash(hash common.Hash, amount int, skip int, reverse bool) error {
  	var (
  		headers []*types.Header
  		unknown bool
  	)
  	for !unknown && len(headers) < amount {
  		origin := p.hc.GetHeaderByHash(hash)
  		if origin == nil {
  			break
  		}
  		number := origin.Number.Uint64()
  		headers = append(headers, origin)
  		if reverse {
  			for i := 0; i <= skip; i++ {
  				if header := p.hc.GetHeader(hash, number); header != nil {
  					hash = header.ParentHash
  					number--
  				} else {
  					unknown = true
  					break
  				}
  			}
  		} else {
  			var (
  				current = origin.Number.Uint64()
  				next    = current + uint64(skip) + 1
  			)
  			if header := p.hc.GetHeaderByNumber(next); header != nil {
  				if p.hc.GetBlockHashesFromHash(header.Hash(), uint64(skip+1))[skip] == hash {
  					hash = header.Hash()
  				} else {
  					unknown = true
  				}
  			} else {
  				unknown = true
  			}
  		}
  	}
  	p.dl.DeliverHeaders(p.id, headers)
  	return nil
  }
docs: // RequestHeadersByHash implements downloader.Peer, returning a batch of headers
  // defined by the origin hash and the associated query parameters.