peer: use MaxMessagePayload instead of hard coding

This commit is contained in:
yyforyongyu 2020-12-02 06:07:53 +08:00
parent 26da2b2c9e
commit be626df689
No known key found for this signature in database
GPG Key ID: 9BCD95C4FF296868

@ -124,7 +124,7 @@ func (c *Error) MsgType() MessageType {
// This is part of the lnwire.Message interface. // This is part of the lnwire.Message interface.
func (c *Error) MaxPayloadLength(uint32) uint32 { func (c *Error) MaxPayloadLength(uint32) uint32 {
// 32 + 2 + 65501 // 32 + 2 + 65501
return 65535 return MaxMessagePayload
} }
// isASCII is a helper method that checks whether all bytes in `data` would be // isASCII is a helper method that checks whether all bytes in `data` would be