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:
Joost Jager
2019-12-05 12:55:17 +01:00
parent 202b7c26a7
commit 1d5844c196
8 changed files with 212 additions and 3 deletions

6
record/experimental.go Normal file
View File

@@ -0,0 +1,6 @@
package record
const (
// KeySendType is the custom record identifier for key send preimages.
KeySendType uint64 = 5482373484
)