code: func GetChainIDFromBlock(block *cb.Block) (string, error) {
  	if block == nil || block.Data == nil || block.Data.Data == nil || len(block.Data.Data) == 0 {
  		return "", errors.Errorf("failed to retrieve channel id - block is empty")
  	}
  	var err error
  	envelope, err := GetEnvelopeFromBlock(block.Data.Data[0])
  	if err != nil {
  		return "", err
  	}
  	payload, err := GetPayload(envelope)
  	if err != nil {
  		return "", err
  	}
  
  	if payload.Header == nil {
  		return "", errors.Errorf("failed to retrieve channel id - payload header is empty")
  	}
  	chdr, err := UnmarshalChannelHeader(payload.Header.ChannelHeader)
  	if err != nil {
  		return "", err
  	}
  
  	return chdr.ChannelId, nil
  }
docs: // GetChainIDFromBlock returns chain ID in the block