lnwire: remove the Validate method from the Message interface
This commit revues the Validate method from the Message interface as the method is no longer used and is a relic from an older version of the codebase.
This commit is contained in:
21 files changed
-283
No files matched your search
@@ -70,21 +70,3 @@ func (msg *Init) Command() uint32 {
|
||||
func (msg *Init) MaxPayloadLength(uint32) uint32 {
|
||||
return 2 + maxAllowedSize + 2 + maxAllowedSize
|
||||
}
|
||||
|
||||
// Validate performs any necessary sanity checks to ensure all fields present
|
||||
// on the Init are valid.
|
||||
//
|
||||
// This is part of the lnwire.Message interface.
|
||||
func (msg *Init) Validate() error {
|
||||
if msg.GlobalFeatures.serializedSize() > maxAllowedSize {
|
||||
return errors.Errorf("global feature vector exceed max allowed "+
|
||||
"size %v", maxAllowedSize)
|
||||
}
|
||||
|
||||
if msg.LocalFeatures.serializedSize() > maxAllowedSize {
|
||||
return errors.Errorf("local feature vector exceed max allowed "+
|
||||
"size %v", maxAllowedSize)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
Reference in new issue
Block a user