mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-30 23:53:41 +02:00
invoices: treat replayed HTLCs beforehand.
We make sure that HTLCs which have already been decided upon are resolved before before allowing the external interceptor to potentially cancel them back. This makes the implementation for the external HTLC interceptor more streamlined.
This commit is contained in:
@@ -765,6 +765,9 @@ type InvoiceStateUpdateDesc struct {
|
||||
|
||||
// InvoiceUpdateCallback is a callback used in the db transaction to update the
|
||||
// invoice.
|
||||
// TODO(ziggie): Add the option of additional return values to the callback
|
||||
// for example the resolution which is currently assigned via an outer scope
|
||||
// variable.
|
||||
type InvoiceUpdateCallback = func(invoice *Invoice) (*InvoiceUpdateDesc, error)
|
||||
|
||||
// ValidateInvoice assures the invoice passes the checks for all the relevant
|
||||
|
Reference in New Issue
Block a user