Skip to content

3541 - Dev#7

Closed
carlaKC wants to merge 12 commits intomainfrom
3541-surface-reason
Closed

3541 - Dev#7
carlaKC wants to merge 12 commits intomainfrom
3541-surface-reason

Conversation

@carlaKC
Copy link
Copy Markdown
Owner

@carlaKC carlaKC commented Apr 2, 2025

No description provided.

carlaKC added 12 commits March 31, 2025 09:21
This failure code isn't used anywhere in the codebase and is not defined
in BOLT 04.
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.
@carlaKC carlaKC closed this Apr 2, 2025
@carlaKC carlaKC deleted the 3541-surface-reason branch April 2, 2025 18:48
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