Skip to content

Allow calling claim_funds() on intercepted HTLCs #2839

@tvolk131

Description

@tvolk131

Currently, according to documentation for HTLCIntercepted, ChannelManager::forward_intercepted_htlc or ChannelManager::fail_intercepted_htlc must be called in response to all intercepted HTLCs. Essentially we can either re-route the payment to a real channel, or unwind it. But what if we want to get the pre-image out-of-band? I'd like to be able to respond to an HTLCIntercepted event by fetching the pre-image outside of the lightning protocol and simply providing it to the ChannelManager to claim the funds. claim_funds() is just the method I'm looking for! If calling claim_funds() on intercepted HTLCs would already work, let's update the documentation to reflect this. If not, let's add support for it. Either way, we should update do_test_intercepted_payment().

For context, I'm working on building a Fedimint lightning gateway, where pre-images are received through what is essentially a federation-enforced HTLC, and the final hop happens separate from lightning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions