code: func NewBlock(channelID string, transactions ...*TxInfo) *cb.Block {
  	var data [][]byte
  	txValidationFlags := make([]uint8, len(transactions))
  	for i, txInfo := range transactions {
  		envBytes, err := proto.Marshal(newEnvelope(channelID, txInfo))
  		if err != nil {
  			panic(err)
  		}
  		data = append(data, envBytes)
  		txValidationFlags[i] = uint8(txInfo.TxValidationCode)
  	}
  
  	blockMetaData := make([][]byte, 4)
  	blockMetaData[cb.BlockMetadataIndex_TRANSACTIONS_FILTER] = txValidationFlags
  
  	return &cb.Block{
  		Header:   &cb.BlockHeader{},
  		Metadata: &cb.BlockMetadata{Metadata: blockMetaData},
  		Data:     &cb.BlockData{Data: data},
  	}
  }
docs: // NewBlock returns a new mock block initialized with the given channel