mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-29 07:00:55 +02:00
channeldb: split cancelHTLCs
logic in the UpdateInvoice
method
Previous to this commit we were able to call `UpdateInvoice` with an updated that added and cancelled htlcs at the same time. The function returned an error if there was overlapping between the two htlc set. However, that behavior was not used in the LND code itself. Eventually we want to split this method in multiple ones, among them one for canceling htlcs and another one for adding them. For that reason, this behavior is not supported anymore.
This commit is contained in:
@@ -711,6 +711,7 @@ func (i *InvoiceRegistry) cancelSingleHtlc(invoiceRef InvoiceRef,
|
||||
}
|
||||
|
||||
return &InvoiceUpdateDesc{
|
||||
UpdateType: CancelHTLCsUpdate,
|
||||
CancelHtlcs: canceledHtlcs,
|
||||
SetID: setID,
|
||||
}, nil
|
||||
|
Reference in New Issue
Block a user