code: func (msg *MsgGetData) BtcEncode(w io.Writer, pver uint32, enc MessageEncoding) error {
  	// Limit to max inventory vectors per message.
  	count := len(msg.InvList)
  	if count > MaxInvPerMsg {
  		str := fmt.Sprintf("too many invvect in message [%v]", count)
  		return messageError("MsgGetData.BtcEncode", str)
  	}
  
  	err := WriteVarInt(w, pver, uint64(count))
  	if err != nil {
  		return err
  	}
  
  	for _, iv := range msg.InvList {
  		err := writeInvVect(w, pver, iv)
  		if err != nil {
  			return err
  		}
  	}
  
  	return nil
  }
docs: // BtcEncode encodes the receiver to w using the bitcoin protocol encoding.
  // This is part of the Message interface implementation.