Skip to content

lsps-plugin: fail HTLC with TEMPORARY_CHANNEL_FAILURE on JIT channel errors#9271

Open
Andezion wants to merge 1 commit into
ElementsProject:masterfrom
Andezion:fix-htlc-silent-fundchannel-error-clean
Open

lsps-plugin: fail HTLC with TEMPORARY_CHANNEL_FAILURE on JIT channel errors#9271
Andezion wants to merge 1 commit into
ElementsProject:masterfrom
Andezion:fix-htlc-silent-fundchannel-error-clean

Conversation

@Andezion

@Andezion Andezion commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Problem

In service.rs, handle_htlc_safe caught all errors from handle_htlc_inner and responded with "result": "continue" while only logging at debug! level. This silently swallowed failures during JIT channel opening - most critically, fundchannel failures caused by insufficient on-chain balance. The paying node received no failure signal and the operator had no actionable log output

Fix

Replace the catch-all continue with a typed dispatch on HtlcError:

  • HtlcError::FundChannel -> warn! (operator action required) + TEMPORARY_CHANNEL_FAILURE
  • HtlcError::ChannelReadyCheck -> warn! + TEMPORARY_CHANNEL_FAILURE
  • HtlcError::CapacityQuery -> error! + TEMPORARY_CHANNEL_FAILURE
    The outer handle_htlc_safe still catches truly unexpected errors (deserialization and stuff like that) and continues, which is the correct behaviour for unknown failures

Important

26.09 FREEZE August 5th: Non-bugfix PRs not ready by this date will wait for 26.12.

RC1 is scheduled on August 17th

The final release is scheduled for September 7th.

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:

  • The changelog has been updated in the relevant commit(s) according to the guidelines.
  • Tests have been added or modified to reflect the changes.
  • Documentation has been reviewed and updated as needed.
  • Related issues have been listed and linked, including any that this PR closes.
  • Important All PRs must consider how to reverse any persistent changes for tools/lightning-downgrade

@Andezion Andezion self-assigned this Jul 1, 2026
@madelinevibes madelinevibes added this to the v26.09 milestone Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants