code: func (p *Peer) IsWitnessEnabled() bool {
  	p.flagsMtx.Lock()
  	witnessEnabled := p.witnessEnabled
  	p.flagsMtx.Unlock()
  
  	return witnessEnabled
  }
docs: // IsWitnessEnabled returns true if the peer has signalled that it supports
  // segregated witness.
  //
  // This function is safe for concurrent access.