hsmd: Implement hsmd_forget_channel for Channel Deletion in HSMD #6988
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: hsmd: Added hsmd_forget_channel to enable explicit channel deletion. ([#6987])
Motivation: Previously, a signer prematurely forgetting a channel led to failures in unresolved channel requests. This update introduces hsmd_forget_channel, allowing nodes to explicitly notify signers when a channel is irrevocably resolved and can be safely forgotten. This ensures synchronized channel cleanup between nodes and signers.
This change maintains backward and forward compatibility. Nodes explicitly check whether a signer has
WIRE_HSMD_FORGET_CHANNEL
capability before sending the message. Nodes withoutWIRE_HSMD_FORGET_CHANNEL
capability won't send this message. Signers capable of handling this message but not receiving it will continue to use conservative pruning methods.Fixes #6987