server+peer: check ErrEdgeNotFound when enabling/disabling a channel

In this commit, we also check ErrEdgeNotFound when attempting to send an
active/inactive channel update for a channel to the network. We do this
as it's possible that a channel has confirmed, but it still does not
meet the required number of confirmations to be publicly announced.
This commit is contained in:
Wilmer Paulino committed 2018-09-21 17:24:36 -07:00
1 parent f13c1d2787
commit 99a4952239
2 files changed
+12 -10

No files matched your search

+3 -3
View File
@@ -505,9 +505,9 @@ func (p *peer) loadActiveChannels(chans []*channeldb.OpenChannel) error {
// ChannelUpdate. If this channel is already active,
// the update won't be sent.
err := p.server.announceChanStatus(chanPoint, false)
if err != nil {
peerLog.Errorf("unable to send out active "+
"channel update: %v", err)
if err != nil && err != channeldb.ErrEdgeNotFound {
srvrLog.Errorf("Unable to enable channel %v: %v",
chanPoint, err)
}
}
}()