lnrpc: remove receipt field from invoice
This commit is contained in:
7 files changed
+554
-596
No files matched your search
@@ -57,10 +57,6 @@ type AddInvoiceData struct {
|
||||
// description_hash field is not being used.
|
||||
Memo string
|
||||
|
||||
// Deprecated. An optional cryptographic receipt of payment which is not
|
||||
// implemented.
|
||||
Receipt []byte
|
||||
|
||||
// The preimage which will allow settling an incoming HTLC payable to
|
||||
// this preimage. If Preimage is set, Hash should be nil. If both
|
||||
// Preimage and Hash are nil, a random preimage is generated.
|
||||
@@ -154,10 +150,6 @@ func AddInvoice(ctx context.Context, cfg *AddInvoiceConfig,
|
||||
return nil, nil, fmt.Errorf("memo too large: %v bytes "+
|
||||
"(maxsize=%v)", len(invoice.Memo), channeldb.MaxMemoSize)
|
||||
}
|
||||
if len(invoice.Receipt) > channeldb.MaxReceiptSize {
|
||||
return nil, nil, fmt.Errorf("receipt too large: %v bytes "+
|
||||
"(maxsize=%v)", len(invoice.Receipt), channeldb.MaxReceiptSize)
|
||||
}
|
||||
if len(invoice.DescriptionHash) > 0 && len(invoice.DescriptionHash) != 32 {
|
||||
return nil, nil, fmt.Errorf("description hash is %v bytes, must be 32",
|
||||
len(invoice.DescriptionHash))
|
||||
@@ -392,7 +384,6 @@ func AddInvoice(ctx context.Context, cfg *AddInvoiceConfig,
|
||||
newInvoice := &channeldb.Invoice{
|
||||
CreationDate: creationDate,
|
||||
Memo: []byte(invoice.Memo),
|
||||
Receipt: invoice.Receipt,
|
||||
PaymentRequest: []byte(payReqString),
|
||||
FinalCltvDelta: int32(payReq.MinFinalCLTVExpiry()),
|
||||
Expiry: payReq.Expiry(),
|
||||
|
||||
@@ -94,7 +94,6 @@ func CreateRPCInvoice(invoice *channeldb.Invoice,
|
||||
|
||||
rpcInvoice := &lnrpc.Invoice{
|
||||
Memo: string(invoice.Memo[:]),
|
||||
Receipt: invoice.Receipt[:],
|
||||
RHash: decoded.PaymentHash[:],
|
||||
Value: int64(satAmt),
|
||||
ValueMsat: int64(invoice.Terms.Value),
|
||||
|
||||
Reference in new issue
Block a user