lnrpc: add first hop custom records to RPC payment info

This commit is contained in:
Oliver Gugger committed 2024-09-05 11:18:16 +02:00
1 parent 1b31835230
commit afdceab400
5 files changed
+1260 -1214

No files matched your search

+1237 -1214
View File
File diff suppressed because it is too large. Load diff
+6
View File
@@ -4162,6 +4162,12 @@ message Payment {
uint64 payment_index = 15; uint64 payment_index = 15;
PaymentFailureReason failure_reason = 16; PaymentFailureReason failure_reason = 16;
/*
The custom TLV records that were sent to the first hop as part of the HTLC
wire message for this payment.
*/
map<uint64, bytes> first_hop_custom_records = 17;
} }
message HTLCAttempt { message HTLCAttempt {
+8
View File
@@ -6417,6 +6417,14 @@
}, },
"failure_reason": { "failure_reason": {
"$ref": "#/definitions/lnrpcPaymentFailureReason" "$ref": "#/definitions/lnrpcPaymentFailureReason"
},
"first_hop_custom_records": {
"type": "object",
"additionalProperties": {
"type": "string",
"format": "byte"
},
"description": "The custom TLV records that were sent to the first hop as part of the HTLC\nwire message for this payment."
} }
} }
}, },
+8
View File
@@ -1095,6 +1095,14 @@
}, },
"failure_reason": { "failure_reason": {
"$ref": "#/definitions/lnrpcPaymentFailureReason" "$ref": "#/definitions/lnrpcPaymentFailureReason"
},
"first_hop_custom_records": {
"type": "object",
"additionalProperties": {
"type": "string",
"format": "byte"
},
"description": "The custom TLV records that were sent to the first hop as part of the HTLC\nwire message for this payment."
} }
} }
}, },
+1
View File
@@ -1697,6 +1697,7 @@ func (r *RouterBackend) MarshallPayment(payment *channeldb.MPPayment) (
Htlcs: htlcs, Htlcs: htlcs,
PaymentIndex: payment.SequenceNum, PaymentIndex: payment.SequenceNum,
FailureReason: failureReason, FailureReason: failureReason,
FirstHopCustomRecords: payment.Info.FirstHopCustomRecords,
}, nil }, nil
} }