netann/chan_status_manager: remove unknown edges from passive disable
Modifies the netann.ChanStatusManager to remove outpoints from the set of tracked channels when it encounters a channeldb.ErrEdgeNotFound when passively disabling. It is possible for this to occur if a channel is closed w/o first being disabled, which may happen if the remote party force closes.
This commit is contained in:
parent
f525d313b2
commit
714e42fce2
@ -466,6 +466,18 @@ func (m *ChanStatusManager) disableInactiveChannels() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("Unable to sign update disabling "+
|
log.Errorf("Unable to sign update disabling "+
|
||||||
"channel(%v): %v", outpoint, err)
|
"channel(%v): %v", outpoint, err)
|
||||||
|
|
||||||
|
// If the edge was not found, this is a likely indicator
|
||||||
|
// that the channel has been closed. Thus we remove the
|
||||||
|
// outpoint from the set of tracked outpoints to prevent
|
||||||
|
// further attempts.
|
||||||
|
if err == channeldb.ErrEdgeNotFound {
|
||||||
|
log.Debugf("Removing channel(%v) from "+
|
||||||
|
"consideration for passive disabling",
|
||||||
|
outpoint)
|
||||||
|
delete(m.chanStates, outpoint)
|
||||||
|
}
|
||||||
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user