diff --git a/peer.go b/peer.go index d438a4701..659ccd2ee 100644 --- a/peer.go +++ b/peer.go @@ -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) } } }() diff --git a/server.go b/server.go index 4c9ce4c0a..d87f6e92a 100644 --- a/server.go +++ b/server.go @@ -2847,8 +2847,6 @@ func (s *server) announceChanStatus(op wire.OutPoint, disabled bool) error { return nil } - srvrLog.Debugf("Announcing channel(%v) disabled=%v", op, disabled) - // Retrieve the latest update for this channel. We'll use this // as our starting point to send the new update. chanUpdate, err := s.fetchLastChanUpdateByOutPoint(op) @@ -2888,6 +2886,8 @@ func (s *server) announceChanStatus(op wire.OutPoint, disabled bool) error { return err } + srvrLog.Debugf("Announcing channel(%v) disabled=%v", op, disabled) + // Once signed, we'll send the new update to all of our peers. if err := s.applyChannelUpdate(chanUpdate); err != nil { return err @@ -3053,8 +3053,8 @@ func (s *server) watchChannelStatus() { newStatus := make(map[wire.OutPoint]activeStatus) for _, c := range channels { // We'll skip any private channels, as they - // aren't used for routing within the network - // by other nodes. + // aren't used for routing within the network by + // other nodes. if c.ChannelFlags&lnwire.FFAnnounceChannel == 0 { continue } @@ -3113,10 +3113,12 @@ func (s *server) watchChannelStatus() { delete(status, op) err = s.announceChanStatus(op, disable) - if err != nil { + if err != nil && + err != channeldb.ErrEdgeNotFound { + srvrLog.Errorf("Unable to "+ - "disable channel: %v", - err) + "disable channel %v: %v", + op, err) } } }