discovery: properly set node's color field when adding NodeAnnouncement to router

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.
This commit is contained in:
Olaoluwa Osuntokun 2017-12-02 18:28:26 -08:00
parent 4b6ada98d6
commit ee7c3ff01c
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

View File

@ -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 {