channeldb: store hold invoice

This commit is contained in:
Joost Jager
2018-10-05 10:14:56 +02:00
parent 8392f6d28f
commit 19f79613df
7 changed files with 111 additions and 43 deletions

View File

@@ -85,7 +85,9 @@ func (p *preimageBeacon) LookupPreimage(
// If we've found the invoice, then we can return the preimage
// directly.
if err != channeldb.ErrInvoiceNotFound {
if err != channeldb.ErrInvoiceNotFound &&
invoice.Terms.PaymentPreimage != channeldb.UnknownPreimage {
return invoice.Terms.PaymentPreimage, true
}