Commit Graph

8 Commits

Author SHA1 Message Date
Conner Fromknecht
b0949054e5
invoices: fail HTLCs that target the wrong type of invoice 2021-05-10 22:02:14 -07:00
Conner Fromknecht
8402e346f5
channeldb/invoice: fail extra HTLC sets immeidately 2021-05-10 16:55:18 -07:00
Conner Fromknecht
ea934e1be9
invoices: add TestSpontaneousAmpPayment
Adds a set of test cases that exercise the spontaneous AMP payment flow
with valid and invalid reconstructions, as well as with single and
multiple HTLCs. This also asserts that spontaneous AMP is gated behind
the existing AcceptKeysend flag.
2021-04-07 12:08:35 -07:00
Conner Fromknecht
90a255078d
invoices: reconstruct AMP child preimages 2021-04-07 12:08:35 -07:00
Conner Fromknecht
88b72ab398
invoices: add processAMP 2021-04-07 12:08:34 -07:00
Olaoluwa Osuntokun
81f6b4dcfe
invoices: add String() method to failure resolution outcome
In this commit, we add a String() method to the failure resolution
outcome. Without this, logs aren't very useful as the integer version of
the outcome is printed rather than the description.
2020-07-12 17:25:53 -07:00
carla
1ad395ec3f
htlcswitch: add failure details to incoming failures
This commit adds LinkErrors with failure details to htlcs which fail on
our incoming link. This change is made with the intention of notifying
detailed htlc failure reasons in sendHTLCError. The FailureDetail
interface is implemented on FailureResolutionResults so that they can
directly be used to enrich LinkErrors. sendHtlcError is updated to
take a LinkError in preparation for the addition of a htlcnotifier
which will notify the detail of the error.
2020-02-06 19:43:39 +02:00
carla
8cbed23f26
invoices: split resolution result into settle, fail and accept enums
This commit splits the resolution result enum into results divided
by outcome (settled, failed or accepted). This allows us to more
strictly control which resolution results can be used with which
HtlcResolution structs, to prevent the combination of a settle
resolution result with a failure resolution result, for example.
2020-02-06 19:41:39 +02:00