Repository navigation
Conversation
An HTLC being replayed was committed before the channel entered shutdown. Do not treat it as a new HTLC added after shutdown; replay the htlc_accepted hook so the plugin can return its verdict. Changelog-Fixed: lightningd: replay htlc_accepted for HTLCs committed before shutdown or on-chain instead of failing them on restart without calling the hook. Co-authored-by: Cursor <cursoragent@cursor.com>
Andezion
previously approved these changes
Oct 19, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
sangbida
force-pushed
the
fix/htlc-hook-replay-shutdown
branch
from
October 20, 2026 02:39
05feb60 to
6022734
Compare
Collaborator
Author
|
@Andezion, thanks for the review, I've fixed up the test according to your comments :) |
This branch has not been deployed
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.
An htlc_accepted HTLC that is replayed on startup was committed before the channel entered shutdown or went on-chain. Restart was treating it as a new HTLC added after shutdown and failing it with permanent_channel_failure, without calling the hook again.
Skip that check on replay so the plugin can still return its verdict. A new HTLC added after shutdown is still rejected.