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