github.com/btcsuite/btcd@v0.24.0/wire/msgverack.go (about) 1 // Copyright (c) 2013-2015 The btcsuite developers 2 // Use of this source code is governed by an ISC 3 // license that can be found in the LICENSE file. 4 5 package wire 6 7 import ( 8 "io" 9 ) 10 11 // MsgVerAck defines a bitcoin verack message which is used for a peer to 12 // acknowledge a version message (MsgVersion) after it has used the information 13 // to negotiate parameters. It implements the Message interface. 14 // 15 // This message has no payload. 16 type MsgVerAck struct{} 17 18 // BtcDecode decodes r using the bitcoin protocol encoding into the receiver. 19 // This is part of the Message interface implementation. 20 func (msg *MsgVerAck) BtcDecode(r io.Reader, pver uint32, enc MessageEncoding) error { 21 return nil 22 } 23 24 // BtcEncode encodes the receiver to w using the bitcoin protocol encoding. 25 // This is part of the Message interface implementation. 26 func (msg *MsgVerAck) BtcEncode(w io.Writer, pver uint32, enc MessageEncoding) error { 27 return nil 28 } 29 30 // Command returns the protocol command string for the message. This is part 31 // of the Message interface implementation. 32 func (msg *MsgVerAck) Command() string { 33 return CmdVerAck 34 } 35 36 // MaxPayloadLength returns the maximum length the payload can be for the 37 // receiver. This is part of the Message interface implementation. 38 func (msg *MsgVerAck) MaxPayloadLength(pver uint32) uint32 { 39 return 0 40 } 41 42 // NewMsgVerAck returns a new bitcoin verack message that conforms to the 43 // Message interface. 44 func NewMsgVerAck() *MsgVerAck { 45 return &MsgVerAck{} 46 }