code: func (msg *MsgReject) BtcEncode(w io.Writer, pver uint32, enc MessageEncoding) error {
  	if pver < RejectVersion {
  		str := fmt.Sprintf("reject message invalid for protocol "+
  			"version %d", pver)
  		return messageError("MsgReject.BtcEncode", str)
  	}
  
  	// Command that was rejected.
  	err := WriteVarString(w, pver, msg.Cmd)
  	if err != nil {
  		return err
  	}
  
  	// Code indicating why the command was rejected.
  	err = writeElement(w, msg.Code)
  	if err != nil {
  		return err
  	}
  
  	// Human readable string with specific details (over and above the
  	// reject code above) about why the command was rejected.
  	err = WriteVarString(w, pver, msg.Reason)
  	if err != nil {
  		return err
  	}
  
  	// CmdBlock and CmdTx messages have an additional hash field that
  	// identifies the specific block or transaction.
  	if msg.Cmd == CmdBlock || msg.Cmd == CmdTx {
  		err := writeElement(w, &msg.Hash)
  		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.