invoices: accept mpp payments
This commit is contained in:
10 files changed
+1125
-594
No files matched your search
@@ -75,14 +75,15 @@ func CreateRPCInvoice(invoice *channeldb.Invoice,
|
||||
}
|
||||
|
||||
rpcHtlc := lnrpc.InvoiceHTLC{
|
||||
ChanId: key.ChanID.ToUint64(),
|
||||
HtlcIndex: key.HtlcID,
|
||||
AcceptHeight: int32(htlc.AcceptHeight),
|
||||
AcceptTime: htlc.AcceptTime.Unix(),
|
||||
ExpiryHeight: int32(htlc.Expiry),
|
||||
AmtMsat: uint64(htlc.Amt),
|
||||
State: state,
|
||||
CustomRecords: htlc.CustomRecords,
|
||||
ChanId: key.ChanID.ToUint64(),
|
||||
HtlcIndex: key.HtlcID,
|
||||
AcceptHeight: int32(htlc.AcceptHeight),
|
||||
AcceptTime: htlc.AcceptTime.Unix(),
|
||||
ExpiryHeight: int32(htlc.Expiry),
|
||||
AmtMsat: uint64(htlc.Amt),
|
||||
State: state,
|
||||
CustomRecords: htlc.CustomRecords,
|
||||
MppTotalAmtMsat: uint64(htlc.MppTotalAmt),
|
||||
}
|
||||
|
||||
// Only report resolved times if htlc is resolved.
|
||||
|
||||
+580
-571
File diff suppressed because it is too large.
Load diff
@@ -2407,6 +2407,9 @@ message InvoiceHTLC {
|
||||
|
||||
/// Custom tlv records.
|
||||
map<uint64, bytes> custom_records = 9 [json_name = "custom_records"];
|
||||
|
||||
/// The total amount of the mpp payment in msat.
|
||||
uint64 mpp_total_amt_msat = 10 [json_name = "mpp_total_amt_msat"];
|
||||
}
|
||||
|
||||
message AddInvoiceResponse {
|
||||
|
||||
@@ -2854,6 +2854,11 @@
|
||||
"format": "byte"
|
||||
},
|
||||
"description": "/ Custom tlv records."
|
||||
},
|
||||
"mpp_total_amt_msat": {
|
||||
"type": "string",
|
||||
"format": "uint64",
|
||||
"description": "/ The total amount of the mpp payment in msat."
|
||||
}
|
||||
},
|
||||
"title": "/ Details of an HTLC that paid to an invoice"
|
||||
|
||||
Reference in new issue
Block a user