code: func CreateChannelHeader(headerType common.HeaderType, opts ChannelHeaderOpts) (*common.ChannelHeader, error) {
  	logger.Debugf("buildChannelHeader - headerType: %s channelID: %s txID: %d epoch: %d chaincodeID: %s timestamp: %v", headerType, opts.TxnHeader.channelID, opts.TxnHeader.id, opts.Epoch, opts.ChaincodeID, opts.Timestamp)
  	channelHeader := &common.ChannelHeader{
  		Type:        int32(headerType),
  		ChannelId:   opts.TxnHeader.channelID,
  		TxId:        string(opts.TxnHeader.id),
  		Epoch:       opts.Epoch,
  		TlsCertHash: opts.TLSCertHash,
  	}
  
  	if opts.Timestamp.IsZero() {
  		opts.Timestamp = time.Now()
  	}
  
  	ts, err := ptypes.TimestampProto(opts.Timestamp)
  	if err != nil {
  		return nil, errors.Wrap(err, "failed to create timestamp in channel header")
  	}
  	channelHeader.Timestamp = ts
  
  	if opts.ChaincodeID != "" {
  		ccID := &pb.ChaincodeID{
  			Name: opts.ChaincodeID,
  		}
  		headerExt := &pb.ChaincodeHeaderExtension{
  			ChaincodeId: ccID,
  		}
  		headerExtBytes, err := proto.Marshal(headerExt)
  		if err != nil {
  			return nil, errors.Wrap(err, "marshal header extension failed")
  		}
  		channelHeader.Extension = headerExtBytes
  	}
  	return channelHeader, nil
  }
docs: // CreateChannelHeader is a utility method to build a common chain header (TODO refactor)
  //
  // TODO: Determine if this function should be exported after refactoring is completed.