channeldb: don't cancel other HTLCs w/ diff setID once once is settled
With this change, we allow multiple users to concurrently pay the same AMP invoice with distinct set IDs.
This commit is contained in:
2 files changed
+12
-7
No files matched your search
@@ -2710,13 +2710,12 @@ func updateHtlc(resolveTime time.Time, htlc *InvoiceHTLC,
|
||||
}
|
||||
|
||||
htlcState = HtlcStateSettled
|
||||
} else {
|
||||
htlcState = HtlcStateCanceled
|
||||
}
|
||||
|
||||
// Only persist the changes if the invoice is moving to the
|
||||
// settled state.
|
||||
if persist {
|
||||
// settled state, and we're actually updating the state to
|
||||
// settled.
|
||||
if persist && htlcState == HtlcStateSettled {
|
||||
htlc.State = htlcState
|
||||
htlc.ResolveTime = resolveTime
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user