lnd/htlcswitch
eugene 87a486f1f9
htlcswitch: remove synchronous link handoff, special-case keystone err
This allows Switch-initiated payments to be failed back if they don't
make it into a commitment. Prior to this commit, a Switch-initiated
HTLC could get "lost" meaning the circuit wouldn't get deleted except
if conditions were "right" and the network result store would never
be made aware of the HTLC's fate. Switch-initiated HTLC's are now
passed to the link's mailbox to ensure they can be failed back.

This change also special-cases the ErrDuplicateKeystone error from
OpenCircuits(...) so that callers of updateCommitTx() in the link
don't send an Error to the peer if they encounter the keystone error.
With the first async change, the keystone error should now always
be recoverable.
2022-05-11 13:49:37 -04:00
..
hodl multi: add golang 1.17 compatible build tags 2021-09-29 17:31:37 -07:00
hop htlcswitch+invoices: log payment metadata 2022-04-13 22:55:42 +02:00
circuit.go htlcswitch: move hop iterator into htlcswitch/hop package 2019-09-05 15:30:31 +02:00
circuit_map.go htlcswitch+lntest: modify Switch to persist resolution messages 2022-04-29 16:40:19 -04: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+lntest: modify Switch to persist resolution messages 2022-04-29 16:40:19 -04:00
decayedlog.go htlcswitch: fix duplicate close 2022-01-10 08:42:32 +01:00
decayedlog_test.go htlcswitch: fix duplicate close 2022-01-10 08:42:32 +01: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
htlcnotifier.go multi: add logs when subservers are starting 2022-02-11 21:17:03 +08:00
interceptable_switch.go contractcourt: add onchain interception 2022-04-13 11:31:33 +02:00
interfaces.go htlcswitch: remove synchronous link handoff, special-case keystone err 2022-05-11 13:49:37 -04:00
link.go htlcswitch: remove synchronous link handoff, special-case keystone err 2022-05-11 13:49:37 -04:00
link_isolated_test.go htlcswitch: introduce and embed packetHandler interface in ChannelLink 2021-08-10 17:15:51 -04:00
link_test.go htlcswitch: add an always on mode to interceptable switch 2022-03-17 17:39:37 +01:00
linkfailure.go htlcswitch: remove synchronous link handoff, special-case keystone err 2022-05-11 13:49:37 -04:00
log.go htlcswitch/hop: fix logging 2019-09-09 13:52:35 +02:00
mailbox.go multi: typo fixes [skip ci] 2022-05-03 20:55:40 +00:00
mailbox_test.go multi: use btcd's btcec/v2 and btcutil modules 2022-03-09 19:02:37 +01:00
mock.go htlcswitch: remove synchronous link handoff, special-case keystone err 2022-05-11 13:49:37 -04:00
packet.go multi: Fix typos [skip ci] 2022-01-24 12:19:02 +02:00
payment_result.go multi: move all channelstate operations to ChannelStateDB 2021-09-29 17:00:03 +02:00
payment_result_test.go multi: formatting and comment fixes 2022-02-10 11:02:02 +01:00
resolution_store.go htlcswitch: introduce resolutionStore to persist cnct messages 2022-04-29 16:40:16 -04:00
resolution_store_test.go htlcswitch: introduce resolutionStore to persist cnct messages 2022-04-29 16:40:16 -04:00
sequencer.go kvdb: move channeldb/kvdb to top level 2021-05-07 14:18:56 +02:00
switch.go htlcswitch: remove synchronous link handoff, special-case keystone err 2022-05-11 13:49:37 -04:00
switch_test.go htlcswitch: remove synchronous link handoff, special-case keystone err 2022-05-11 13:49:37 -04:00
test_utils.go htlcswitch: add an always on mode to interceptable switch 2022-03-17 17:39:37 +01:00