lnwire: remove MaxPayloadLength from Message interface
Removes the MaxPayloadLength function from the Message interface and checks that each message payload is not greater than MaxMsgBody. Since all messages are now allowed to be 65535 bytes in size, the MaxPayloadLength is no longer needed.
This commit is contained in:
30 files changed
+7
-246
No files matched your search
@@ -118,14 +118,6 @@ func (c *Error) MsgType() MessageType {
|
||||
return MsgError
|
||||
}
|
||||
|
||||
// MaxPayloadLength returns the maximum allowed payload size for an Error
|
||||
// complete message observing the specified protocol version.
|
||||
//
|
||||
// This is part of the lnwire.Message interface.
|
||||
func (c *Error) MaxPayloadLength(uint32) uint32 {
|
||||
return MaxMsgBody
|
||||
}
|
||||
|
||||
// isASCII is a helper method that checks whether all bytes in `data` would be
|
||||
// printable ASCII characters if interpreted as a string.
|
||||
func isASCII(data []byte) bool {
|
||||
|
||||
Reference in new issue
Block a user