lnd/invoices
yyforyongyu df2ecd6bc5
invoices: refactor invoice subscriptions to avoid blocking
This commit fixes a potential blocking when notifying invoice updates.
When a new subscription client is created followed by an immediate
cancel, it's likely the client will be removed from the registry's
map(noop) and then added to its map again. This subscription will then
be kept in registry until lnd is restarted. Another more serious issue
is when multiple subscriptions are made for the same invoice, when the
above case happens, other subscriptions may never send invoice updates
because a previous client has a stopped notification queue that blocks
following notifications.
2021-12-15 02:38:51 +08:00
..
interface.go invoices: expose AMPRecord() method on Payload 2021-03-03 16:26:39 -08:00
invoice_expiry_watcher_test.go invoices/test: add test for hodl invoices 2021-05-11 08:45:30 +02:00
invoice_expiry_watcher.go invoices: do not log when invoice is already deleted 2021-11-01 16:10:45 +01:00
invoiceregistry_test.go invoices: update testSpontaneousAmpPayment for new AMP logic 2021-10-28 15:50:32 -07:00
invoiceregistry.go invoices: refactor invoice subscriptions to avoid blocking 2021-12-15 02:38:51 +08:00
log.go invoices: remove dead code from logger 2020-04-24 19:15:08 +02:00
resolution_result.go invoices: fail HTLCs that target the wrong type of invoice 2021-05-10 22:02:14 -07:00
resolution.go invoices: split resolution result into settle, fail and accept enums 2020-02-06 19:41:39 +02:00
test_utils_test.go multi: refactor SignDigestCompact into SignMessageCompact 2021-10-08 12:06:52 +02:00
update.go invoices: fail HTLCs that target the wrong type of invoice 2021-05-10 22:02:14 -07:00