mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-29 15:11:09 +02:00
Merge pull request #3534 from alrs/discovery-test-improvements
discovery: Goroutine Test Fixes and Linting
This commit is contained in:
@@ -1559,7 +1559,7 @@ func (d *AuthenticatedGossiper) processNetworkAnnouncement(
|
||||
// We'll ignore any channel announcements that target any chain
|
||||
// other than the set of chains we know of.
|
||||
if !bytes.Equal(msg.ChainHash[:], d.cfg.ChainHash[:]) {
|
||||
err := fmt.Errorf("Ignoring ChannelAnnouncement from "+
|
||||
err := fmt.Errorf("ignoring ChannelAnnouncement from "+
|
||||
"chain=%v, gossiper on chain=%v", msg.ChainHash,
|
||||
d.cfg.ChainHash)
|
||||
log.Errorf(err.Error())
|
||||
@@ -1720,9 +1720,7 @@ func (d *AuthenticatedGossiper) processNetworkAnnouncement(
|
||||
var channelUpdates []*networkMsg
|
||||
|
||||
d.pChanUpdMtx.Lock()
|
||||
for _, cu := range d.prematureChannelUpdates[shortChanID] {
|
||||
channelUpdates = append(channelUpdates, cu)
|
||||
}
|
||||
channelUpdates = append(channelUpdates, d.prematureChannelUpdates[shortChanID]...)
|
||||
|
||||
// Now delete the premature ChannelUpdates, since we added them
|
||||
// all to the queue of network messages.
|
||||
@@ -1785,7 +1783,7 @@ func (d *AuthenticatedGossiper) processNetworkAnnouncement(
|
||||
// We'll ignore any channel announcements that target any chain
|
||||
// other than the set of chains we know of.
|
||||
if !bytes.Equal(msg.ChainHash[:], d.cfg.ChainHash[:]) {
|
||||
err := fmt.Errorf("Ignoring ChannelUpdate from "+
|
||||
err := fmt.Errorf("ignoring ChannelUpdate from "+
|
||||
"chain=%v, gossiper on chain=%v", msg.ChainHash,
|
||||
d.cfg.ChainHash)
|
||||
log.Errorf(err.Error())
|
||||
|
Reference in New Issue
Block a user