code: func (f *EndpointFilter) Accept(peer fab.Peer) bool {
  
  	peerConfig, err := comm.SearchPeerConfigFromURL(f.ctx.EndpointConfig(), peer.URL())
  	if err != nil {
  		return true
  	}
  
  	chPeer := f.getChannelPeer(peerConfig)
  	if chPeer == nil {
  		return true
  	}
  
  	switch t := f.endpointType; t {
  	case ChaincodeQuery:
  		return chPeer.ChaincodeQuery
  	case EndorsingPeer:
  		return chPeer.EndorsingPeer
  	case LedgerQuery:
  		return chPeer.LedgerQuery
  	case EventSource:
  		return chPeer.EventSource
  	}
  
  	return true
  }
docs: // Accept returns false if this peer is to be excluded from the target list