From ee7c3ff01c3bb8023722b8f73b6efb21e9a2691f Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Sat, 2 Dec 2017 18:28:26 -0800 Subject: [PATCH] discovery: properly set node's color field when adding NodeAnnouncement to router MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In this commit, we fix an existing bug when processing new node announcement. Before this commit, we wouldn’t also copy over the color field of a node’s announcement. As a result, when went to synchronize our graph state with that of a connecting peer, we would generate an invalid node announcement. We fix this by properly setting the color field of a node. --- discovery/gossiper.go | 1 + 1 file changed, 1 insertion(+) diff --git a/discovery/gossiper.go b/discovery/gossiper.go index bc49d883..db7e9be1 100644 --- a/discovery/gossiper.go +++ b/discovery/gossiper.go @@ -879,6 +879,7 @@ func (d *AuthenticatedGossiper) processNetworkAnnouncement(nMsg *networkMsg) []l Alias: msg.Alias.String(), AuthSig: msg.Signature, Features: features, + Color: msg.RGBColor, } if err := d.cfg.Router.AddNode(node); err != nil {