code: func (conCert ConsenterCertificate) IsConsenterOfChannel(configBlock *common.Block) error {
  	if configBlock == nil {
  		return errors.New("nil block")
  	}
  	envelopeConfig, err := utils.ExtractEnvelope(configBlock, 0)
  	if err != nil {
  		return err
  	}
  	bundle, err := channelconfig.NewBundleFromEnvelope(envelopeConfig)
  	if err != nil {
  		return err
  	}
  	oc, exists := bundle.OrdererConfig()
  	if !exists {
  		return errors.New("no orderer config in bundle")
  	}
  	m := &etcdraft.ConfigMetadata{}
  	if err := proto.Unmarshal(oc.ConsensusMetadata(), m); err != nil {
  		return err
  	}
  
  	for _, consenter := range m.Consenters {
  		if bytes.Equal(conCert, consenter.ServerTlsCert) || bytes.Equal(conCert, consenter.ClientTlsCert) {
  			return nil
  		}
  	}
  	return cluster.ErrNotInChannel
  }
docs: // IsConsenterOfChannel returns whether the caller is a consenter of a channel
  // by inspecting the given configuration block.
  // It returns nil if true, else returns an error.