lightningd: notify plugins when finalizing channel#8464
Merged
rustyrussell merged 4 commits intoElementsProject:masterfrom Nov 18, 2025
Merged
lightningd: notify plugins when finalizing channel#8464rustyrussell merged 4 commits intoElementsProject:masterfrom
rustyrussell merged 4 commits intoElementsProject:masterfrom
Conversation
212da79 to
59ff4a9
Compare
Contributor
|
Rebased, added tests, updated schema, deprecated the non-idiomatic "message": null field. |
e8e641b to
f53aef8
Compare
Signed-off-by: Rusty Russell <[email protected]>
…cations. Somehow I missed this when deprecating `short_channel_id` being null. Changelog-Deprecated: Plugins: `channel_state_changed` notification `message` field being `null`: it will be omitted instead. Signed-off-by: Rusty Russell <[email protected]>
f53aef8 to
6724f93
Compare
Contributor
|
Somehow I missed that this wasn't attached to the milestone. Rebased and merging now! |
6724f93 to
7348734
Compare
Changelog-Added: Plugins now receive `channel_state_changed` notification upon final change to `CLOSED` state.
Signed-off-by: Rusty Russell <[email protected]>
7348734 to
9e9145b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog-Added: Plugins now receive
channel_state_changednotification upon final change toCLOSEDstate.This is needed for plugins that want to track the set of currently user-visible channels, i.e., those that
listpeerchannelsreports. Thanks to #5381, plugins can watch for initialchannel_state_changednotifications to know when channels have been added to the visible set, but with no notification upon transition of channels into theCLOSEDstate, plugins cannot watch for channels being removed from the visible set.Note that this PR covers not quite the same use case as is covered by #8048. That PR adds a mostly redundant
channel_closednotification that is emitted whenever a channel transitions into theCLOSINGD_COMPLETEstate (and it apparently misses the case of a unilateral closure), whereas this PR notifies plugins of a channel's final transition into theCLOSEDstate (which happens later), whereafter the channel is no longer reported bylistpeerchannels.Checklist
Before submitting the PR, ensure the following tasks are completed. If an item is not applicable to your PR, please mark it as checked:
new_statefield values indoc/developers-guide/plugin-development/event-notifications.md, so I didn't see anywhere to note the new case.