From 4ab16b5c912bc29bde5410d72ef1ca4482b06910 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Wed, 29 Nov 2017 17:53:16 -0800 Subject: [PATCH] discovery: process AnnouncementSignatures msgs serially --- discovery/gossiper.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/discovery/gossiper.go b/discovery/gossiper.go index daa764e0..c9b3c148 100644 --- a/discovery/gossiper.go +++ b/discovery/gossiper.go @@ -573,6 +573,19 @@ func (d *AuthenticatedGossiper) networkHandler() { feeUpdate.errResp <- nil case announcement := <-d.networkMsgs: + // Channel annoucnement signatures are the only message + // that we'll process serially. + if _, ok := announcement.msg.(*lnwire.AnnounceSignatures); ok { + emittedAnnouncements := d.processNetworkAnnouncement( + announcement, + ) + if emittedAnnouncements != nil { + announcements.AddMsgs( + emittedAnnouncements..., + ) + } + } + // We'll set up any dependant, and wait until a free // slot for this job opens up, this allow us to not // have thousands of goroutines active.