htlcswitch: interceptor expiry check

This commit is contained in:
Joost Jager committed 2022-04-12 08:27:06 +02:00
1 parent bae0b6bdf9
commit 13dff2fb3e
6 files changed
+143 -14

No files matched your search

+5 -1
View File
@@ -38,6 +38,10 @@ const (
// timeout is a timeout value to use for tests which need to wait for
// a return value on a channel.
timeout = time.Second * 5
// testCltvRejectDelta is the minimum delta between expiry and current
// height below which htlcs are rejected.
testCltvRejectDelta = 13
)
var (
@@ -368,7 +372,7 @@ func createTestPeer(notifier chainntnfs.ChainNotifier,
ChanActiveTimeout: chanActiveTimeout,
InterceptSwitch: htlcswitch.NewInterceptableSwitch(
nil, false,
nil, testCltvRejectDelta, false,
),
ChannelDB: dbAlice.ChannelStateDB(),