mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-03 08:41:33 +02:00
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.
This commit is contained in:
@@ -107,8 +107,10 @@ const (
|
||||
ResultMppInProgress
|
||||
)
|
||||
|
||||
// String returns a string representation of the result.
|
||||
func (f FailResolutionResult) String() string {
|
||||
// FailureString returns a string representation of the result.
|
||||
//
|
||||
// Note: it is part of the FailureDetail interface.
|
||||
func (f FailResolutionResult) FailureString() string {
|
||||
switch f {
|
||||
case resultInvalidFailure:
|
||||
return "invalid failure result"
|
||||
|
Reference in New Issue
Block a user