msgverack.go raw

   1  package wire
   2  
   3  import (
   4  	"io"
   5  )
   6  
   7  // MsgVerAck defines a bitcoin verack message which is used for a peer to acknowledge a version message (MsgVersion)
   8  // after it has used the information to negotiate parameters. It implements the Message interface. This message has no
   9  // payload.
  10  type MsgVerAck struct{}
  11  
  12  // BtcDecode decodes r using the bitcoin protocol encoding into the receiver. This is part of the Message interface
  13  // implementation.
  14  func (msg *MsgVerAck) BtcDecode(r io.Reader, pver uint32, enc MessageEncoding) (e error) {
  15  	return nil
  16  }
  17  
  18  // BtcEncode encodes the receiver to w using the bitcoin protocol encoding. This is part of the Message interface
  19  // implementation.
  20  func (msg *MsgVerAck) BtcEncode(w io.Writer, pver uint32, enc MessageEncoding) (e error) {
  21  	return nil
  22  }
  23  
  24  // Command returns the protocol command string for the message.  This is part of the Message interface implementation.
  25  func (msg *MsgVerAck) Command() string {
  26  	return CmdVerAck
  27  }
  28  
  29  // MaxPayloadLength returns the maximum length the payload can be for the receiver. This is part of the Message
  30  // interface implementation.
  31  func (msg *MsgVerAck) MaxPayloadLength(pver uint32) uint32 {
  32  	return 0
  33  }
  34  
  35  // NewMsgVerAck returns a new bitcoin verack message that conforms to the Message interface.
  36  func NewMsgVerAck() *MsgVerAck {
  37  	return &MsgVerAck{}
  38  }
  39