34de5922ed
This commit adds height-based invoice expiry for hodl invoices that have active htlcs. This allows us to cancel our intentionally held htlcs before channels are force closed. We only add this for hodl invoices because we expect regular invoices to automatically be resolved. We still keep hodl invoices in the time-based expiry queue, because we want to expire open invoices that reach their timeout before any htlcs are added. Since htlcs are added after the invoice is created, we add new htlcs as they arrive in the invoice registry. In this commit, we allow adding of duplicate entries for an invoice to be added to the expiry queue as each htlc arrives to keep implementation simple. Our cancellation logic can already handle the case where an entry is already canceled, so this is ok. |
||
---|---|---|
.. | ||
interface.go | ||
invoice_expiry_watcher_test.go | ||
invoice_expiry_watcher.go | ||
invoiceregistry_test.go | ||
invoiceregistry.go | ||
log.go | ||
resolution_result.go | ||
resolution.go | ||
test_utils_test.go | ||
update.go |