mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-04 09:48:19 +01:00
discovery: process AnnouncementSignatures msgs serially
This commit is contained in:
parent
7757721a92
commit
4ab16b5c91
1 changed files with 13 additions and 0 deletions
|
@ -573,6 +573,19 @@ func (d *AuthenticatedGossiper) networkHandler() {
|
||||||
feeUpdate.errResp <- nil
|
feeUpdate.errResp <- nil
|
||||||
|
|
||||||
case announcement := <-d.networkMsgs:
|
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
|
// We'll set up any dependant, and wait until a free
|
||||||
// slot for this job opens up, this allow us to not
|
// slot for this job opens up, this allow us to not
|
||||||
// have thousands of goroutines active.
|
// have thousands of goroutines active.
|
||||||
|
|
Loading…
Add table
Reference in a new issue