github.com/palcoin-project/palcd@v1.0.0/wire/msgsendaddrv2.go (about) 1 package wire 2 3 import ( 4 "io" 5 ) 6 7 // MsgSendAddrV2 defines a bitcoin sendaddrv2 message which is used for a peer 8 // to signal support for receiving ADDRV2 messages (BIP155). It implements the 9 // Message interface. 10 // 11 // This message has no payload. 12 type MsgSendAddrV2 struct{} 13 14 // BtcDecode decodes r using the bitcoin protocol encoding into the receiver. 15 // This is part of the Message interface implementation. 16 func (msg *MsgSendAddrV2) BtcDecode(r io.Reader, pver uint32, enc MessageEncoding) error { 17 return nil 18 } 19 20 // BtcEncode encodes the receiver to w using the bitcoin protocol encoding. 21 // This is part of the Message interface implementation. 22 func (msg *MsgSendAddrV2) BtcEncode(w io.Writer, pver uint32, enc MessageEncoding) error { 23 return nil 24 } 25 26 // Command returns the protocol command string for the message. This is part 27 // of the Message interface implementation. 28 func (msg *MsgSendAddrV2) Command() string { 29 return CmdSendAddrV2 30 } 31 32 // MaxPayloadLength returns the maximum length the payload can be for the 33 // receiver. This is part of the Message interface implementation. 34 func (msg *MsgSendAddrV2) MaxPayloadLength(pver uint32) uint32 { 35 return 0 36 } 37 38 // NewMsgSendAddrV2 returns a new bitcoin sendaddrv2 message that conforms to the 39 // Message interface. 40 func NewMsgSendAddrV2() *MsgSendAddrV2 { 41 return &MsgSendAddrV2{} 42 }