discovery: process AnnouncementSignatures msgs serially

This commit is contained in:
Olaoluwa Osuntokun 2017-11-29 17:53:16 -08:00
parent 7757721a92
commit 4ab16b5c91
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

View File

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