Skip to content

lndclient: add AutoFailHeight to InterceptedHtlc - #287

Open
calvinrzachman wants to merge 1 commit into
lightninglabs:masterfrom
calvinrzachman:surface-auto-fail-height
Open

lndclient: add AutoFailHeight to InterceptedHtlc#287
calvinrzachman wants to merge 1 commit into
lightninglabs:masterfrom
calvinrzachman:surface-auto-fail-height

Conversation

@calvinrzachman

@calvinrzachman calvinrzachman commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Description

lnd sends auto_fail_height on every intercepted HTLC, the height at which it will auto-fail the held HTLC to keep the channel from force-closing, but lndclient dropped it. This adds AutoFailHeight to InterceptedHtlc
and passes the field through.

It is the real deadline for work against a held HTLC: earlier than IncomingExpiryHeight by FinalCltvRejectDelta, so callers reasoning against IncomingExpiryHeight think they have more runway than they do.

Pull Request Checklist

  • PR is opened against correct version branch.
  • Version compatibility matrix in the README and minimal required version
    in lnd_services.go are updated.
  • Update macaroon_recipes.go if your PR adds a new method that is called
    differently than the RPC method it invokes.

lnd sends, on every htlc interception, the block height at which it will
auto-fail the held htlc to keep the channel from force-closing. The
conversion into InterceptedHtlc dropped this field, so callers could not
see it and had to reason against IncomingExpiryHeight instead. That is
the wrong deadline: the auto-fail height is earlier by lnd's
FinalCltvRejectDelta, so a hold-and-forward consumer believes it has
more runway than it does.
@calvinrzachman
calvinrzachman marked this pull request as ready for review August 18, 2026 02:35
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