mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-22 07:08:14 +02:00
lnrpc: add first hop custom records to RPC payment info
This commit is contained in:
@@ -1095,6 +1095,14 @@
|
||||
},
|
||||
"failure_reason": {
|
||||
"$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."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@@ -1682,21 +1682,22 @@ func (r *RouterBackend) MarshallPayment(payment *channeldb.MPPayment) (
|
||||
|
||||
return &lnrpc.Payment{
|
||||
// TODO: set this to setID for AMP-payments?
|
||||
PaymentHash: hex.EncodeToString(paymentID[:]),
|
||||
Value: satValue,
|
||||
ValueMsat: msatValue,
|
||||
ValueSat: satValue,
|
||||
CreationDate: payment.Info.CreationTime.Unix(),
|
||||
CreationTimeNs: creationTimeNS,
|
||||
Fee: int64(fee.ToSatoshis()),
|
||||
FeeSat: int64(fee.ToSatoshis()),
|
||||
FeeMsat: int64(fee),
|
||||
PaymentPreimage: hex.EncodeToString(preimage[:]),
|
||||
PaymentRequest: string(payment.Info.PaymentRequest),
|
||||
Status: status,
|
||||
Htlcs: htlcs,
|
||||
PaymentIndex: payment.SequenceNum,
|
||||
FailureReason: failureReason,
|
||||
PaymentHash: hex.EncodeToString(paymentID[:]),
|
||||
Value: satValue,
|
||||
ValueMsat: msatValue,
|
||||
ValueSat: satValue,
|
||||
CreationDate: payment.Info.CreationTime.Unix(),
|
||||
CreationTimeNs: creationTimeNS,
|
||||
Fee: int64(fee.ToSatoshis()),
|
||||
FeeSat: int64(fee.ToSatoshis()),
|
||||
FeeMsat: int64(fee),
|
||||
PaymentPreimage: hex.EncodeToString(preimage[:]),
|
||||
PaymentRequest: string(payment.Info.PaymentRequest),
|
||||
Status: status,
|
||||
Htlcs: htlcs,
|
||||
PaymentIndex: payment.SequenceNum,
|
||||
FailureReason: failureReason,
|
||||
FirstHopCustomRecords: payment.Info.FirstHopCustomRecords,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user