lnd/htlcswitch
ziggie 0b63989f3a
lnwallet+htlcswitch: Introduce a fee buffer.
We take into account a fee buffer of twice the current fee rate
of the commitment transaction plus an additional htlc output
when we are the opener of the channel hence pay when publishing the
commitment transaction. This buffer is not consensus critical
because we only consider it when we are in control of adding a
new htlc to the state. The goal is to prevent situations
where we push our local balance below our channel reserve due to
parallel adding of htlcs to the state. Its not a panacea for these
situations but until we have __option_simplified_update__ deployed
widely on the network its a good precaution to protect against
fee spikes and parallel adding of htlcs to the update log.

Moreover the way the available balance for a channel changed.
We now need to account for a fee buffer when we are the channel
opener. Therefore all the tests had to be adopted.
2024-01-06 20:52:46 +01:00
..
hodl multi: add golang 1.17 compatible build tags 2021-09-29 17:31:37 -07:00
hop htlcswitch/test: allow missing field errors in payload decode 2023-12-18 11:27:56 -05:00
testdata multi: update linter, fix new issues 2023-06-13 11:58:33 +02:00
circuit.go multi: create channeldb/models package 2023-01-16 07:14:55 -08:00
circuit_map.go htlcswitch: improve loggings for Keystone 2023-01-12 22:08:02 +08:00
circuit_map_test.go htlcswitch+lntest: modify Switch to persist resolution messages 2022-04-29 16:40:19 -04:00
circuit_test.go htlcswitch: clean up test resources and temporary files 2022-10-10 10:32:39 -07:00
decayedlog.go htlcswitch: fix duplicate close 2022-01-10 08:42:32 +01:00
decayedlog_test.go htlcswitch: use T.TempDir to create temporary test directory 2022-08-24 09:03:01 +08:00
failure.go htlcswitch: add linkError field to htlcpacket 2020-02-06 19:43:29 +02:00
failure_detail.go htlcswitch: add linkError field to htlcpacket 2020-02-06 19:43:29 +02:00
failure_test.go multi: update linter, fix new issues 2023-06-13 11:58:33 +02:00
held_htlc_set.go multi: create channeldb/models package 2023-01-16 07:14:55 -08:00
held_htlc_set_test.go multi: create channeldb/models package 2023-01-16 07:14:55 -08:00
htlcnotifier.go multi: add debug logs to catch slow shutdown 2023-10-06 16:34:47 -07:00
interceptable_switch.go multi: create channeldb/models package 2023-01-16 07:14:55 -08:00
interfaces.go multi: move BackupState and RegisterChannel to Manager 2023-11-28 10:59:40 +02:00
link.go lnwallet+htlcswitch: Introduce a fee buffer. 2024-01-06 20:52:46 +01:00
link_isolated_test.go lnwallet+htlcswitch: add NewCommitState struct, modify send/recv sig to accept 2023-08-22 16:31:18 -07:00
link_test.go lnwallet+htlcswitch: Introduce a fee buffer. 2024-01-06 20:52:46 +01:00
linkfailure.go multi: ensure link is always torn down due to db failures, add exponential back off for sql-kvdb failures (#7927) 2023-08-30 16:48:00 -07:00
log.go htlcswitch/hop: fix logging 2019-09-09 13:52:35 +02:00
mailbox.go htlcswitch: TODO for obviating type assertions 2023-07-31 09:52:33 -05:00
mailbox_test.go htlcswitch: use mock clock in TestMailBoxAddExpiry 2023-01-12 22:08:15 +08:00
mock.go multi: extend InvoiceDB methods with a context argument (#8066) 2023-10-11 13:42:59 +02:00
packet.go server+htlcswitch: prevent privacy leaks, allow alias routing 2022-07-07 17:10:28 -04:00
payment_result.go multimutex: remove HashMutex, make Mutex type a type param 2023-06-01 17:39:49 -07:00
payment_result_test.go htlcswitch: clean up test resources and temporary files 2022-10-10 10:32:39 -07:00
resolution_store.go htlcswitch: introduce resolutionStore to persist cnct messages 2022-04-29 16:40:16 -04:00
resolution_store_test.go htlcswitch: use T.TempDir to create temporary test directory 2022-08-24 09:03:01 +08:00
sequencer.go kvdb: move channeldb/kvdb to top level 2021-05-07 14:18:56 +02:00
switch.go routing: fail attempt when no shard is found or circuit generation fails 2023-11-13 16:09:11 +08:00
switch_test.go multi: extend InvoiceDB methods with a context argument (#8066) 2023-10-11 13:42:59 +02:00
test_utils.go multi: extend InvoiceDB methods with a context argument (#8066) 2023-10-11 13:42:59 +02:00