channelnotifier: add InactiveLinkEvent

This commit adds a new event `InactiveLinkEvent` to be used when a link
becomes inactive.
This commit is contained in:
yyforyongyu
2022-11-24 06:57:53 +08:00
parent ea0eb2ce72
commit ced8833895
2 changed files with 24 additions and 3 deletions

View File

@@ -4624,9 +4624,12 @@ func (r *rpcServer) SubscribeChannelEvents(req *lnrpc.ChannelEventSubscription,
},
}
// Completely ignore ActiveLinkEvent as this is explicitly not
// exposed to the RPC.
case channelnotifier.ActiveLinkEvent:
// Completely ignore ActiveLinkEvent and
// InactiveLinkEvent as this is explicitly not exposed
// to the RPC.
case channelnotifier.ActiveLinkEvent,
channelnotifier.InactiveLinkEvent:
continue
case channelnotifier.FullyResolvedChannelEvent:
@@ -7323,6 +7326,8 @@ func (r *rpcServer) SubscribeChannelBackups(req *lnrpc.ChannelBackupSubscription
continue
case channelnotifier.ActiveLinkEvent:
continue
case channelnotifier.InactiveLinkEvent:
continue
}
// Now that we know the channel state has changed,