invoices: jit insert key send invoices
This commit adds handling code for the key send custom record. If this record is present and its hash matches the payment hash, invoice registry will insert a new invoice into the database "just in time". The subsequent settle flow is unchanged. The newly inserted invoice is picked up and settled. Notifications will be broadcast as usual.
This commit is contained in:
8 files changed
+212
-3
No files matched your search
@@ -219,7 +219,8 @@ type Invoice struct {
|
||||
// or any other message which fits within the size constraints.
|
||||
Memo []byte
|
||||
|
||||
// PaymentRequest is the encoded payment request for this invoice.
|
||||
// PaymentRequest is the encoded payment request for this invoice. For
|
||||
// spontaneous (key send) payments, this field will be empty.
|
||||
PaymentRequest []byte
|
||||
|
||||
// CreationDate is the exact time the invoice was created.
|
||||
|
||||
Reference in new issue
Block a user