multi: enforce routing.MinCLTVDelta=18 for invoices + chanupd

This commit clamps all user-chosen CLTVs in LND to be at least 18, which
is the new conservative value used in the sepc. This minimum is applied
uniformly to forwarding CLTV deltas (via channel updates) as well as
final CLTV deltas for new invoices.
This commit is contained in:
Conner Fromknecht
2020-07-24 13:13:56 -07:00
parent 213c51a281
commit 6622c4814e
5 changed files with 47 additions and 18 deletions

View File

@@ -73,7 +73,7 @@ const (
// minTimeLockDelta is the minimum timelock we require for incoming
// HTLCs on our channels.
minTimeLockDelta = 4
minTimeLockDelta = routing.MinCLTVDelta
// defaultAcceptorTimeout is the time after which an RPCAcceptor will time
// out and return false if it hasn't yet received a response.