Skip to content

3541: Remove HTLC Destination for Error Code #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 12 commits into from
Closed

Conversation

carlaKC
Copy link
Owner

@carlaKC carlaKC commented Mar 31, 2025

No description provided.

This failure code isn't used anywhere in the codebase and is not defined
in BOLT 04.
@carlaKC carlaKC force-pushed the 3541-dev branch 6 times, most recently from e492f94 to ce7adac Compare April 2, 2025 14:44
carlaKC added 11 commits April 2, 2025 10:45
Realm is no longer specified in BOLT04, use the specified version
error instead.
Although the specification allows an all-zero sha256_of_onion for
invalid_onion_blinding errors, it still requires that the value is set.
To be able to obtain the underlying error reason for the pending HTLC,
break up the helper method into two parts. This also removes some
unnecessary wrapping/unwrapping of messages in PendingHTLCStatus types.
HTLCDestination currently contains a combination of information about
the type of HTLC we handled to fail (a payment, a forward etc) and
error information for a select set of cases (unknown next peer, for
example).

In preparation for a refactor that will split the failure reason out
into its own enum, this commit renames HTLCDestination to
HTLCHandlingType.
Rename variant to be more specific to the current context - a
FailedPayment could be a payment that we failed to dispatch or one
that we rejected on receive.
Standardize naming within the HTLCHandlingType struct to present more
consistent API terminology.
This variant of HTLCHandlingType contains infromation about the
failure cause along with its type - as an UnknownNextPeer is just an
InvalidForward that has the failure type UnknownNextPeer.

This commit deprecates the variant's use, while still writing it to
disk to allow the option to downgrade.
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.

1 participant