code: func (p *Peer) WantsHeaders() bool {
  	p.flagsMtx.Lock()
  	sendHeadersPreferred := p.sendHeadersPreferred
  	p.flagsMtx.Unlock()
  
  	return sendHeadersPreferred
  }
docs: // WantsHeaders returns if the peer wants header messages instead of
  // inventory vectors for blocks.
  //
  // This function is safe for concurrent access.