mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-25 18:11:08 +02:00
channeldb+routing: store full htlc failure reason
This commit extends the htlc fail info with the full failure reason that was received over the wire. In a later commit, this info will also be exposed on the rpc interface. Furthermore it serves as a building block to make SendToRoute reliable across restarts.
This commit is contained in:
@@ -126,7 +126,9 @@ func TestPaymentControlSwitchFail(t *testing.T) {
|
||||
}
|
||||
|
||||
err = pControl.FailAttempt(
|
||||
info.PaymentHash, 2, &HTLCFailInfo{},
|
||||
info.PaymentHash, 2, &HTLCFailInfo{
|
||||
Reason: HTLCFailUnreadable,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -362,7 +364,9 @@ func TestPaymentControlDeleteNonInFligt(t *testing.T) {
|
||||
// Fail the payment attempt.
|
||||
err := pControl.FailAttempt(
|
||||
info.PaymentHash, attempt.AttemptID,
|
||||
&HTLCFailInfo{},
|
||||
&HTLCFailInfo{
|
||||
Reason: HTLCFailUnreadable,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to fail htlc: %v", err)
|
||||
|
Reference in New Issue
Block a user