code: func (msg *MsgVersion) BtcEncode(w io.Writer, pver uint32, enc MessageEncoding) error {
  	err := validateUserAgent(msg.UserAgent)
  	if err != nil {
  		return err
  	}
  
  	err = writeElements(w, msg.ProtocolVersion, msg.Services,
  		msg.Timestamp.Unix())
  	if err != nil {
  		return err
  	}
  
  	err = writeNetAddress(w, pver, &msg.AddrYou, false)
  	if err != nil {
  		return err
  	}
  
  	err = writeNetAddress(w, pver, &msg.AddrMe, false)
  	if err != nil {
  		return err
  	}
  
  	err = writeElement(w, msg.Nonce)
  	if err != nil {
  		return err
  	}
  
  	err = WriteVarString(w, pver, msg.UserAgent)
  	if err != nil {
  		return err
  	}
  
  	err = writeElement(w, msg.LastBlock)
  	if err != nil {
  		return err
  	}
  
  	// There was no relay transactions field before BIP0037Version.  Also,
  	// the wire encoding for the field is true when transactions should be
  	// relayed, so reverse it from the DisableRelayTx field.
  	if pver >= BIP0037Version {
  		err = writeElement(w, !msg.DisableRelayTx)
  		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.