In this PR, we add a new streaming RPC call that allows clients to be notified whenever a channel becomes inactive, active, or closed. This is useful for any type of application that would otherwise need to poll the channel state to keep up to date on what channels are active, inactive, or closed.
In service of this goal, we add an additional subsystem called
For closed channel events, we add a proxy in the
The text was updated successfully, but these errors were encountered:
`createRPCChannel` is used by the `listchannels` RPC call and will be used by `subscribechannels` as well. `createRPCClosedChannel` is used by the `closedchannels` RPC call and will also be used by `subscribechannels`. This is used by the `listchannels` RPC call and will be used by `subscribechannels` as well. Its purpose is to mitigate code duplication between the two RPC calls.
This commit introduces the channel notifier which is a central source of active, inactive, and closed channel events. This notifier was originally intended to be used by the `SubscribeChannels` streaming RPC call, but can be used by any subsystem that needs to be notified on a channel becoming active, inactive or closed. It may also be extended in the future to support other types of notifications.
This function will be used in the switch to retrieve the channel point for a link, allowing the switch to retrieve individual channels from the database.
Because the integration tests are already long-running, it is preferable to add testing for the RPC channel update subscription to an existing test rather than adding additional tests.