lnd.xprv/htlcswitch
carla 34de5922ed
multi: add height-based invoice expiry
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.
2021-05-11 08:45:29 +02:00
..
hodl htlcswitch/hodl: switch from debug tag to dev 2018-10-05 13:04:45 +09:00
hop htlcswitch/hop: parse and validate AMP records 2021-04-07 12:08:33 -07:00
circuit_map.go multi: add reset closure to kvdb.Update 2020-11-05 17:57:12 +01:00
circuit_test.go server+mod: use ECDH interface for sphinx router 2020-05-20 09:05:36 +02:00
circuit.go htlcswitch: move hop iterator into htlcswitch/hop package 2019-09-05 15:30:31 +02:00
decayedlog_test.go server+htlcswitch: auto compact sphinx DB too 2020-11-13 10:19:51 +01:00
decayedlog.go kvdb: add timeout options for bbolt (#4787) 2020-12-07 15:31:49 -08:00
failure_detail.go htlcswitch: add linkError field to htlcpacket 2020-02-06 19:43:29 +02:00
failure.go htlcswitch: add linkError field to htlcpacket 2020-02-06 19:43:29 +02:00
htlcnotifier.go channelnotifier+discover+invoices: return error in Stop functions 2021-04-13 13:26:01 +03:00
interceptable_switch.go multi: send channel update for failed interceptor packets 2021-04-22 19:39:37 +02:00
interfaces.go watchtower/wtclient: parameterize backup task with channel type 2020-11-25 15:04:12 -08:00
link_isolated_test.go htlcswitch/test: add test cases that triggers empty commit sig 2019-11-06 09:21:21 +01:00
link_test.go htlcswitch: init mockFeeEstimator in other LinkChannelConfigs 2021-02-15 12:14:32 -08:00
link.go multi: cap anchors feerate at configurable maximum 2020-12-15 19:54:50 +01:00
linkfailure.go htlcswitch: add PermanentFailure to LinkFailureError 2020-11-04 10:50:28 +01:00
log.go htlcswitch/hop: fix logging 2019-09-09 13:52:35 +02:00
mailbox_test.go htlcswitch: change ForwardPackets to return error 2020-06-18 12:48:21 +03:00
mailbox.go htlcswitch: change ForwardPackets to return error 2020-06-18 12:48:21 +03:00
mock.go multi: add height-based invoice expiry 2021-05-11 08:45:29 +02:00
packet.go htlcswitch: expose custom records on intercepted packet 2020-06-27 11:00:46 +02:00
payment_result_test.go lnwire: prep wire messages for TLV extensions 2021-02-24 17:31:55 +01:00
payment_result.go channeldb+htlcswitch: write wire messages using length prefix 2021-02-24 17:15:27 +01:00
sequencer.go multi: add reset closure to kvdb.Update 2020-11-05 17:57:12 +01:00
switch_test.go channelnotifier+discover+invoices: return error in Stop functions 2021-04-13 13:26:01 +03:00
switch.go router+switch: rename paymentID->attemptID 2021-04-27 08:27:33 +02:00
test_utils.go htlcswitch: init mockFeeEstimator in other LinkChannelConfigs 2021-02-15 12:14:32 -08:00