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:
Olaoluwa Osuntokun committed 2017-04-19 15:03:51 -07:00
1 parent 920fcf3392
commit c8d978261b
21 files changed
-283

No files matched your search

-17
View File
@@ -2,7 +2,6 @@ package lnwire
import (
"bytes"
"errors"
"io"
"github.com/roasbeef/btcd/btcec"
@@ -51,22 +50,6 @@ type ChannelUpdate struct {
// interface.
var _ Message = (*ChannelUpdate)(nil)
// Validate performs any necessary sanity checks to ensure all fields present
// on the ChannelUpdate are valid.
//
// This is part of the lnwire.Message interface.
func (a *ChannelUpdate) Validate() error {
// NOTE: As far as we don't have the node id (public key) in this
// message, we can't validate the signature on this stage, it should
// be validated latter - in discovery service handler.
if a.TimeLockDelta == 0 {
return errors.New("expiry should be greater then zero")
}
return nil
}
// Decode deserializes a serialized ChannelUpdate stored in the passed
// io.Reader observing the specified protocol version.
//