htlcswitch: auto-fail held htlcs

Make the interceptable switch aware of htlc expiry and fail back htlcs in-time
to prevent the counterparty from force-closing the channel.
This commit is contained in:
Joost Jager committed 2022-10-18 18:06:49 +02:00
1 parent 74eeb95e8c
commit a0a50fa844
13 files changed
+429 -212

No files matched your search

+3 -2
View File
@@ -368,8 +368,9 @@ func createTestPeer(t *testing.T, notifier chainntnfs.ChainNotifier,
interceptableSwitch, err := htlcswitch.NewInterceptableSwitch(
&htlcswitch.InterceptableSwitchConfig{
CltvRejectDelta: testCltvRejectDelta,
Notifier: interceptableSwitchNotifier,
CltvRejectDelta: testCltvRejectDelta,
CltvInterceptDelta: testCltvRejectDelta + 3,
Notifier: interceptableSwitchNotifier,
},
)
if err != nil {