mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +01:00
peer: skip sending active channel updates for pending open channels
In this commit, we skip sending active channel update for pending open channels as they are not yet part of the graph.
This commit is contained in:
parent
99a4952239
commit
828ecfe343
8
peer.go
8
peer.go
@ -488,10 +488,12 @@ func (p *peer) loadActiveChannels(chans []*channeldb.OpenChannel) error {
|
||||
p.activeChannels[chanID] = lnChan
|
||||
p.activeChanMtx.Unlock()
|
||||
|
||||
// Only if the channel is public do we need to collect it for
|
||||
// sending out a new enable update.
|
||||
// To ensure we can route through this channel now that the peer
|
||||
// is back online, we'll attempt to send an update to enable it.
|
||||
// This will only be used for non-pending public channels, as
|
||||
// they are the only ones capable of routing.
|
||||
chanIsPublic := dbChan.ChannelFlags&lnwire.FFAnnounceChannel != 0
|
||||
if chanIsPublic {
|
||||
if chanIsPublic && !dbChan.IsPending {
|
||||
activePublicChans = append(activePublicChans, *chanPoint)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user