mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-18 19:41:21 +02:00
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:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user