From 16388aba00fe494c82f5d70d39c0d2ea9dca839c Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Sat, 24 Dec 2016 14:58:26 -0600 Subject: [PATCH] lnwire: temporarily disable chan/node announcement validation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit temporarily disables the signature validation for all announcement related messages which should be authenticated by one or many parties. This feature is being disabled as we don’t yet generate valid signatures for our advertisements and the validation of the messages should be placed in the layer 3 discovery service rather than within within the message parsing layer. --- lnwire/channel_announcement.go | 3 +++ lnwire/node_announcement.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/lnwire/channel_announcement.go b/lnwire/channel_announcement.go index 3595fda7b..09243c864 100644 --- a/lnwire/channel_announcement.go +++ b/lnwire/channel_announcement.go @@ -51,6 +51,9 @@ var _ Message = (*ChannelAnnouncement)(nil) // // This is part of the lnwire.Message interface. func (a *ChannelAnnouncement) Validate() error { + // TODO(roasbeef): move validation to discovery service + return nil + var sigHash []byte sigHash = wire.DoubleSha256(a.FirstNodeID.SerializeCompressed()) diff --git a/lnwire/node_announcement.go b/lnwire/node_announcement.go index ef4f491f8..aa2948be5 100644 --- a/lnwire/node_announcement.go +++ b/lnwire/node_announcement.go @@ -95,6 +95,9 @@ var _ Message = (*NodeAnnouncement)(nil) // // This is part of the lnwire.Message interface. func (a *NodeAnnouncement) Validate() error { + // TODO(roasbeef): move validation to discovery service + return nil + if err := a.Alias.Validate(); err != nil { return err }